Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
1830 吴奕希 15听到多少次掌声 C++ Accepted 0 MS 256 KB 530 2023-11-11 20:40:26

Tests(1/1):


Code:

# include<iostream> using namespace std; int main() { int t=0, n1=1, n2=1, n3=1, sum=1; bool c; while(t<=40) { c=false; t++; if(n1<10) { c=true; n1++; } if(n2<10&&t%2==0) { c=true; n2++; } if(n3<10&&t%4==0) { c=true; n3++; } if(c) { sum++; } } printf("%d", sum); return 0; }