Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
122627 田子熙 15相同数的次数 C++ Accepted 0 MS 260 KB 307 2025-06-21 11:32:28

Tests(1/1):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a=1,b=1,sum=0,c=1; while(a<=20 || b<=30){ if(a==b){ sum+=1; } if(a==20){ a=0; } if(b==30){ b=0; } a++; b++; if(c<=1000){ c++; }else{ break; } } cout<<sum; return 0; }