Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
86299 刘津希 19灯的编号 C++ Compile Error 0 MS 0 KB 311 2024-07-24 14:47:08

Tests(0/0):


Code:

#include <cstring> using namespace std; int main() { int a[1001] = {0}; int n; cin>>n; for (int i = 1; i <= n; i++) { for (int j = 1; j <= n; j++) { if (j % i == 0) { a[j] = !a[j]; } } } for (int i = 1; i <= n; i++) { if (a[i]) { cout << i << " "; } } }


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:5: error: 'cin' was not declared in this scope
     cin>>n;
     ^
Main.cc:17:4: error: 'cout' was not declared in this scope
    cout << i << " ";
    ^