Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
96616 王煜鑫 判断质数(使用while循环) C++ Time Limit Exceeded 1000 MS 268 KB 287 2024-11-09 11:28:56

Tests(0/10):


Code:

#include<iostream> using namespace std; int main(){ int a,i=2; cin>>a; while(i<a){ if(a%i==0){ cout<<"No"; return 0; i++; } } cout<<"Yes"; }