Thursday, March 23, 2017

uva problem-12700 Banglawash

problem link:
In this you just you have to simply count win loss tie and draw then just establish a simple logic

Sunday, March 19, 2017

uva problem 10550 - Combination Lock

In this problem you have to find the number of angle you turn the lock to unlock... First there is must three turn so we can count first 3*360 angle then you have to find the minimum distance between the point and have to count the  angle multiplying digit by 9.

try this after trying if you don't understand then only see the code.otherwise you can't improve yourself in programming.

10929 - You can say 11 uva probelm

In this problem you have to determine weather a number is multiple of  11.
Now what you have to just find the sum of all the digit of the number then  divide it by 11.
if it's divisible by 11 then the number also divisible by 11.

Or, just sum the digit of the number which is odd and which is even. then find the difference between the odd position digit sum and even position digit sum. if it's 0 or divisible by 11 then the number also divisible by 11.

at first try yourself, and if you can't after trying then only see the code otherwise you can't improve yourself in programming.

11689 - Soda Surpler uva problem

Problem link:
This is the easy simulation of problem. just make the sum of 'e' and 'f' and play loop till (sum>=cost)
then do temp=sum/cost  and   answer+=sum then sum%=cost and now sum+=sum


if you don't understand after try then only see the code otherwise you can't improve in programming

Thursday, March 16, 2017

uva problem Zapping-12468

problem link:
Discuss:
In this problem you have to find the minimum number of key press need to go desire channel.
You have only two button in your remote. firstly you just make the difference between the channel.
hence the channel from 0 to 99 and you can go backward so if the difference between channel more then or equal 50 then substitute it from 50.
to make difference between two channel you can use abs() function.


at first try yourself, if you can't then only see the code otherwise you can't increase your skill in programming