Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
129704 翁jq 美丽数 C++ Compile Error 0 MS 0 KB 315 2025-09-02 15:39:54

Tests(0/0):


Code:

#include <bits/stdc++.h> using namespace std; int main() { int n; while(cin>>n){ int cnt = 0; int i = 1; while (1){ if (n > 10000){ return; } if (i % 3 == 0 || i % 5 == 0){ cnt++; } if (cnt == n ){ cout<<i<<endl; break; } i ++; } } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:11:5: error: return-statement with no value, in function returning 'int' [-fpermissive]
     return;
     ^