Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
106707 华雅萱 15相同数的次数 C++ Compile Error 0 MS 0 KB 310 2025-01-16 15:14:50

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ int xt=1;xl=1; int a=0; for(int i=1;i<=1000;i++){ if(xt==xl){ a++; } xt++; xl++; if(xt>20){ xt=1; } if(xl>30){ xl=1; } } cout<<a; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:4:14: error: 'xl' was not declared in this scope
     int xt=1;xl=1;
              ^