Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
90239 张永良 素数判断 C++ Accepted 1 MS 268 KB 257 2024-09-08 13:16:32

Tests(1/1):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a,f=0; cin>>a; for(int i=2;i<a;i++){ if(a%i==0){ f=1; break; } } if(f==0){ cout<<"prime"; }else cout<<"not prime"; return 0; }