| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 84767 | 卢语涵 | 15听到多少次掌声 | C++ | Accepted | 0 MS | 264 KB | 442 | 2024-07-16 14:01:38 |
#include<iostream> using namespace std; int main(){ int a=0,b=0,c=0,time=0,count=0; bool flag=false; while(a+b+c<30){ flag=false; if(time%2==0&&b<10){ b=b+1; flag=true; } if(time%4==0&&c<10){ c=c+1; flag=true; } if(a<10){ a=a+1; flag=true; } if(flag){ count=count+1; } time++; } cout<<count; return 0; }