Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
75934 文 15相同数的次数 C++ Accepted 0 MS 260 KB 294 2024-06-01 10:21:28

Tests(1/1):


Code:

#include<iostream> using namespace std; /** * OJ 1350 */ int main(){ int xt,xl,i; i=1; xt = xl =1; int sum = 0; while(i<=1000) { //1~1000共1000个 if(xt>20) xt=1; if(xl>30) xl=1; if(xt==xl) sum++; xt++; xl++; i++; } cout<<sum; return 0; }