Saturday, July 8, 2017

Uva problem solution 10038 - Jolly Jumpers

problem link:

Discuss:
In this problem you have to first find the difference of successive element.and check is there all digit between 1 to n-1. to do so you can take a bool type array. find difference and check weather the number less then n and bool is true.if bool is true then make it false.if not then it's not jolly.


try yourself  before see the code


Uva problem solution 575 - Skew Binary

problem link:


Discuss:

In this problem you just have to applied simple decimal based conversion system. As the number can big enough you should use string to take input.


try yourself   before see the code


uva problem solution 10469 - To Carry or not to Carry


problem link:

Discuss:  In this problem we just have to do binary AND operation between two digit.and then we get desired value.

try yourself before see the code.



Saturday, June 24, 2017

uva problem solution 913 - Joana and the Odd Numbers

problem link:

Discuss: In this you just you have to simply calculate (((n*(n+2)/2)*3)-6)

try yourself before see the code


Wednesday, June 14, 2017

uva problem solution 543 - Goldbach's Conjecture

problem link:

Discuss:   In this problem you can generate all prime.then compare the smallest problem if it is prime then subtract it from number then compare it with prime number if it is prime number then print both of them or if it is not then increase the value of i;

try yourself before see the code.


uva problem solution 10235 - Simply Emirp

problem link:

Discuss: in this problem you just have to check weather a number is prime or not.you have do it with square root. and then reverse the number and do check again prime number criteria. if it fulfill then it is empri number and obvisouly it should be not equal to previous number. if it is then it is prime


try yourself before see the code



Thursday, June 8, 2017

uva problem solution 11417 - GCD


problem link:

Discuss: in this problem how to find gcd then do the code as in the statement.


try yourself before see the code