Coding problem to be done in 20 -25 mins

Job ID: 31088934

Budget: ₹1,500 – ₹12,500 INR

you have been given a string s of length N. The given string is binary string which consists of only 0's and 1's. Ugliness of a string is defined as the decimal number that the binary string represents. Swap any two numbers by paying a cost of A coins. Flip (0 to 1 or 1 to 0 ) a coin by paying B coins

Input :

N = Length of String
S = String
CASH = Cash you can use
A = Cost of A
B = Cost of B