Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
140358 何兴驰 15相同数的次数 C++ Accepted 0 MS 264 KB 224 2025-12-14 11:22:58

Tests(1/1):


Code:

#include<iostream> using namespace std; int main(){ int i=1,num=0,t=0,x=0; while(i<=1000){ t+=1; if(t>20){ t=1; } x+=1; if(x>30){ x=1; } if(t==x){ num+=1; } i++; } cout<<num; }