摘要:
#include#includeint main(){ int n,move,cnt=0; scanf("%d%d",&n,&move); int* arr; arr=(int*)calloc(n,sizeof(int)); for(int i=0 ; i<n ; ++i) scan... 阅读全文
摘要:
#includeconst int CLK_TCK=100;int main(){ int c1,c2,x; scanf("%d%d",&c1,&c2); x=c2-c1; if(x%CLK_TCK>=50) //换算成秒,先四舍五入处理【warning】:这里是>=不仅仅> x=x/CLK_... 阅读全文
摘要:
当做字符串处理#include#includeint main(){ char A[120],B[120],ca,cb; int iA=0,iB=0; scanf("%s %c %s %c",A,&ca,B,&cb); int lenA=strlen(A),lenB=strlen(B); ... 阅读全文
摘要:
#includeint main(){ int n; long long a,b,c; scanf("%d",&n); for(int turn=1 ; turnc) printf("Case #%d: true\n",turn); else printf("Cas... 阅读全文
摘要:
#includeint main(){ int n,cnt=0; scanf("%d",&n); while(n!=1) { if(n%2==0) n/=2; else n=(3*n+1)/2; ++cnt; } printf("%d\n",cnt)... 阅读全文