Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
97668 金昱帆 素数判断 C++ Wrong Answer 0 MS 268 KB 296 2024-11-16 12:03:20

Tests(0/1):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int b=1; for(int i=2;i<=n-1;i++){ if(n%i==0){ b = 0; break; } } if(b==0){ cout<<n<<"不是质数" <<endl; } else{ cout<<n<<"是质数" <<endl; } return 0; }


Run Info:

------Input------
9973
------Answer-----
prime
------Your output-----
9973是质数