Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
2645 孙浚轩 素数判断 C++ Compile Error 0 MS 0 KB 295 2024-01-20 14:01:53

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ int n; cin>>n; if(n>1){ int i=n/2; while(n%i!=0%%i>1) i--; if(i!=1) cout<<"not "; cout<<"prime"<<endl; } else cout<<"not prime"; cout<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:8:19: error: expected primary-expression before '%' token
      while(n%i!=0%%i>1)
                   ^