| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 138867 | 王顺煜 | 判断质数(使用while循环) | C++ | Compile Error | 0 MS | 0 KB | 237 | 2025-11-30 11:46:16 |
#include<bits/stdc++.h> using namespace std; int main (){ int f=1; long long s=0,i=2; cin>>s; while(s>i){ if(s%i==0){ f=0; } n++; } (if==1){ cout<<"Yes"; }else{ cout<<"No"; } return 0; }
Main.cc: In function 'int main()':
Main.cc:11:4: error: 'n' was not declared in this scope
n++;
^
Main.cc:13:4: error: expected primary-expression before 'if'
(if==1){
^
Main.cc:13:4: error: expected ')' before 'if'