Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
5864 | 邓小龙 | 15听到多少次掌声 | C++ | Accepted | 0 MS | 248 KB | 591 | 2024-12-20 13:19:34 |
#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; bool qw=0,xm=0,xj=0;//0代表没有拍掌,1代表拍掌 int t=0; while(t<=39){ qw=0,xm=0,xj=0; if(t<=9) qw=1; if(t%2==0&&t<=19) xm=1; if(t%4==0&&t<=39) xj=1; if(qw==1||xm==1||xj==1) cnt++; t++; } cout<<cnt<<endl; return 0; }