摘要: #include<stdio.h>#include<string.h>int main(){ int sum,i; char s[1001]; while(scanf("%s",s)!=EOF) { if(s[0]=='0') break; sum=0; for(i=0;i<strlen(s);i++) sum=((sum*10)+s[i]-'0')%33;//大数求余的方法 printf(sum==0?"O... 阅读全文
posted @ 2012-08-29 19:51 尔滨之夏 阅读(345) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>long long a,b;long long up(long long a,long long b){ long long t; if(a==0) return b; while(b!=0) { t=b;b=a%b;a=t; }//求最大公约数; return a;}int main(){ while(scanf("%lld%lld",&a,&b)!=EOF) { if(a==0&&b==0) break; printf("%lld\n",a*b/up(a,b)/up(a,b 阅读全文
posted @ 2012-08-29 17:28 尔滨之夏 阅读(317) 评论(0) 推荐(0) 编辑