Showing posts with label very easy. Show all posts
Showing posts with label very easy. Show all posts

Monday, July 29, 2013

UVA11388 GCD LCM

Just a cup of tea,
let gcd(a,b)=g and lcm(a,b)=l
we need to find out a and b
The point to note is
gcd(g,l)=g and lcm(g,l) is l
;)

HR Red John is back

https://www.hackerrank.com/contests/101july13/challenges/red-john-is-back

Easy solution with the little dp and prime with very mild constraints




Sunday, June 9, 2013

494 Kindergarten Counting Game


Very is problem simple use gets in while loop until end of file and any character other than alphabate is delimiter

Thursday, June 6, 2013

10812 Beat the Spread!



but note test case if sum=0 and differece = 0 so if d > s then continue ; (and not d>=s)

10420 List of Conquests


very easy problem
just note use of map,sort() and getchar()