Run ID Author Problem Lang Verdict Time Memory Code Length Submit Time
57694 zhangzhexuan 判断一个数是否为质数 C++ Wrong Answer 0 MS 240 KB 290 2024-11-26 21:00:00

Tests(0/1):


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


Judgement Protocol: