Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
158464 谭鑫哲 15听到多少次掌声 C++ Accepted 1 MS 264 KB 735 2026-08-22 10:20:06

Tests(1/1):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a=10,b=10,c=10,e=1,s=0; while(a>=0&&b>=0&&c>0){ s+=1;a-=1; if(a>0){ e+=1; } if(a<=0){ a=0; } if(s%2==0){ b-=1; if(b>0&&a==0)e+=1; }if(b<=0){ b=0; } if(s%4==0){ c-=1; if(c>0&&a==0&&b==0)e+=1; } if(c<=0){ c=0; } } cout<<e; return 0; }