Uva 10093 - An Easy Problem!

中午在机房想A的一道题

没A了

关键在于读题

题意

给定一个未知进制下的数,找到x进制,使得这个数整除x-1

若不存在blablabla

6Y

#include
#include
#include
int f(char x){
	if(x>='0'&&x<='9')return x-'0';
	if(x>='A'&&x<='Z')return x-'A'+10;
	if(x>='a'&&x<='z')return x-'a'+36;
	return 0;
	}
int main(){
	char s[1010];
	while(scanf("%s",s)!=EOF){
		int len=strlen(s),i,j;
		int res=2;
		for(i=0;i

5464

AC: 20


你可能感兴趣的:(Mathematics)