Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
4755 | 邓小龙 | 15听到多少次掌声 | C++ | Accepted | 0 MS | 248 KB | 593 | 2024-09-14 23:36:25 |
#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 cnt=0,qw=0,yz=0,xm=0,t=0; while(qw<10||yz<10||xm<10){ t++;//时间经过了几秒 bool f=0;//默认没有拍掌 if((t-1)%1==0&&qw<10) {qw++;f=1;} if((t-1)%2==0&&yz<10) {yz++;f=1;} if((t-1)%4==0&&xm<10) {xm++;f=1;} if(f==1) cnt++; } cout<<cnt<<endl; return 0; }