Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
118686 | 刘佳宇 | 寻找绝对素数 | C++ | Compile Error | 0 MS | 0 KB | 370 | 2025-05-10 09:57:54 |
#include<bits/stdc++.h> using namespace std; bool s=0; int sushu(int n,int m){ for(int i=n;i<=m;i++){ for(int j=2;j<i;j++){ if(i%j==0){ s=0; return s; } else{ s=1; return s; } } } } int main(){ int a,b; for(int i=a;i<=b;i++){ if(sushu(s)==1&&i!=a){ cout<<","<<i; } else{ cout<<i; } } }
Main.cc: In function 'int main()': Main.cc:22:13: error: too few arguments to function 'int sushu(int, int)' if(sushu(s)==1&&i!=a){ ^ Main.cc:4:5: note: declared here int sushu(int n,int m){ ^ Main.cc: In function 'int sushu(int, int)': Main.cc:17:1: warning: control reaches end of non-void function [-Wreturn-type] } ^