Search found 2 matches
Search found 2 matches • Page 1 of 1
- Sat Dec 29, 2012 8:48 pm
- Forum: Volume 107 (10700-10799)
- Topic: 10780 - Again Prime? No Time.
- Replies: 40
- Views: 27444
My algorithm is as Follows: Calculate Factorials upto 5000 by Sieve. Prime Factorize the given m. Check the maximum occurrence of each primes of m into n! by a function get_power(int m, int n). Calculate res = #of total occurrence of a prime in n! / #of total occurrence of a prime in m. Calculate re...
- Sat Dec 29, 2012 12:14 am
- Forum: Volume 101 (10100-10199)
- Topic: 10139 - Factovisors
- Replies: 80
- Views: 27134
I have tested with all the test cases found here and compare with the result of UVA toolkit. Everything seems okay but I got WA. Please tell me what the wrong with my code ? #include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <complex> #include <cstdio> #include <cstdl...