/* Section 1.1 Your Ride Is Here by xieweichong */ #include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char const *argv[]) { char *huixing = (char*)malloc(7*sizeof(char)); char *duiwu = (char*)malloc(7*sizeof(char)); while(scanf("%s %s",huixing,duiwu) != EOF) { int i,hxsum=1,dwsum=1; for(i=0;i<strlen(huixing);i++) hxsum *= huixing[i]-'A'+1; for(i=0;i<strlen(duiwu);i++) dwsum *= duiwu[i]-'A'+1; printf("%d %d",hxsum,dwsum); if(hxsum%47 == dwsum%47) printf("GO\n"); else printf("STAY\n"); } return 0; }
Section 1.1 Your Ride Is Here
原创xieweichong ©著作权
©著作权归作者所有:来自51CTO博客作者xieweichong的原创作品,请联系作者获取转载授权,否则将追究法律责任
下一篇:我的友情链接
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
USCAO section 1.1 Transformations
Transformations
transformation structure c file reference -
USCAO Section 1.1 Milking Cows
Milking Cows) and ends at time
events intervals list input output