1015 Reversible Primes (20)(20 分)提问 A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its reverse 37 is also a prime. Now
问n! 转化成k进制后的位数和尾数的0的个数.[UVA 10061 How many zeros and how many digits?] Given a decimal integer number you will have to find out how many trailing zeros will be there in its factorial in a given number system and also you will have to find how many di
你万万想不到,Long Long 就能存下的数据 #include <iostream> #include <cstdio> #include <cstdlib> #include <map> using namespace std; typedef long long ll; map<char,int>mp; int main() { string s; while(cin>>s){ int max1=-1; int max2=-1
#include<iostream> #include<cstdio> #include<algorithm> #include<cstring> using namespace std; ; char str[maxn]; int a[maxn]; int main() { int n, i, j, ans, t, tt, ttt, mod; scanf("%s", str); n = strlen(str); ans = ; j =
1045 - Digits of Factorial Factorial of an integer is defined by the following function f(0) = 1 f(n) = f(n - 1) * n, if(n > 0) So, factorial of 5 is 120. But in different bases, the factorial may be different. For example, factorial of 5 in base 8 i