Showing posts with label Math. Show all posts
Showing posts with label Math. 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
;)

Saturday, July 27, 2013

uva 10892 LCM Cardinality

Easy lcm problem , where need to store all divisors of the n (no given) and then exploit bruteforce to find lcm of which pair of the divisors is equal to n (number given)

UVA 10717 Mint


Simple Prime number problem with sieve involved. Else part is brute force. Learn to use brute force seeing limits.

Friday, July 26, 2013

UVA10539 Almost Prime Numbers

Another easy one for prime number. Here u have to deal with the figures
after getting all primes just brute force . the no will be not large so u can afford it.
the exponential function grows very fast therefore no of almost prime are less(within computation limits)


UVA543 Goldbach's Conjecture

It is easy problem related to prime number
use sieve of erotheses

Tuesday, July 23, 2013

Prime problems

Learn about prime number from any standard book or competitive programming book.then  try to code basic algorithms like sieve for finding prime then try KPRIME,PRIME1,LEVY,PPERM,RESQ on codechef these are very simple and interesting problem and also their editorial is avalable . So,that u can surely learn something. I will add some other problem title related in somedays.