Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
98497 杨珞烯 判断素数II C++ Compile Error 0 MS 0 KB 265 2024-11-23 10:47:08

Tests(0/0):


Code:

#include <iostream> using namespace std; int main(){ int n,sum=0,pd=0; cin>>n; sum=n; for(int i=2;i<=n;i++){ pd=0; for(int j=2;j<i;j++){ if(i%j==0){ pd=1; } } if(pd==1){ sum--; } } cout<<sum-1f; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:18:13: error: unable to find numeric literal operator 'operator""f'
   cout<