| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 4472 | 李宇轩 | 素数判断 | C++ | Compile Error | 0 MS | 0 KB | 262 | 2024-08-20 18:14:11 |
# include<iostream> using namespace std; int main() { int n,w=0,i=2,r; scanf("%d",&n); while(3<n<10000){ if(n/i==0){ w=1; }else{ i++; } if(w==0){ printf("prime") ;break; }else{ printf("not prime");break;} } } return 0; }
Main.cc: In function 'int main()':
Main.cc:7:9: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
while(3<n<10000){
^
Main.cc:5:16: warning: unused variable 'r' [-Wunused-variable]
int n,w=0,i=2,r;
^
Main.cc: At global scope:
Main.cc:19:2: error: expected unqualified-id before 'return'
return 0;
^
Main.cc:20:1: error: expected declaration before '}' token
}
^