| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 154447 | 吴璟珵 | 12输出m的倍数 | C++ | Compile Error | 0 MS | 0 KB | 307 | 2026-05-30 14:06:16 |
#include<bits/stdc++.h> using namespace std; int main() int n, m; cin >> n >> m; bool first = true; for (int num = m; num <= n; num += m) { if (!first) { cout << " "; } cout << num; first = false; } cout << endl; return 0
Main.cc:4:1: error: expected initializer before 'int'
int n, m;
^
Main.cc:5:5: error: 'cin' does not name a type
cin >> n >> m;
^
Main.cc:8:5: error: expected unqualified-id before 'for'
for (int num = m; num <= n; num += m) {
^
Main.cc:8:23: error: 'num' does not name a type
for (int num = m; num <= n; num += m) {
^
Main.cc:8:33: error: 'num' does not name a type
for (int num = m; num <= n; num += m) {
^
Main.cc:15:5: error: 'cout' does not name a type
cout << endl;
^
Main.cc:16:5: error: expected unqualified-id before 'return'
return 0
^