Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
314147 tc242220 高邓泽霖 GESP:2023-6月等级2-T1-找素数 C++ 通过 100 0 MS 272 KB 257 2024-12-12 17:00:07

Tests(5/5):


#include<bits/stdc++.h> using namespace std; int main(){ int n,m,sum=0; cin>>n>>m; for(int i=n;i<=m;i++){ bool s=true; for(int j=2;j<i;j++){ if(i%j==0){ s=false; break; } } if(s)sum++; }cout<<sum; return 0; }


测评信息: