摘要: #include<stdio.h> #include<string.h> int main() { char s[81]; int i,n,m; gets(s); m=strlen(s); while(s[m-1]==32)m--; s[m]=0; i=0; while(s[i]==32)i++; 阅读全文
posted @ 2020-06-27 21:57 yanglike111 阅读(228) 评论(0) 推荐(0)
摘要: #include<stdio.h> int main() { int sum,n,c;//sum代表喝到的总饮料瓶数,c代表当前的瓶盖数 scanf("%d",&n); sum=n;c=n; while(c>=3) { n=c/3; sum=sum+n; c=n+c%3; } printf("%d" 阅读全文
posted @ 2020-06-27 21:09 yanglike111 阅读(1077) 评论(0) 推荐(0)