| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 84118 | 石晋骁 | 素数对 | C++ | Compile Error | 0 MS | 0 KB | 444 | 2024-07-15 11:37:10 |
#include<bits/stdc++.h> using namespace std; bool isZS(int a,int b){ if(b - a == 2){ for(int j = 2;j < a;j++){ if(a%j == 0){ return false; } } for (int k = 2;k < b;k++){ if(b%k == 0){ return false; } } return true; } return false; } int main(){ int n; cin >> n; for(int i = 3;i < n;i = i + 2){ if(isZS(i) && isZS(i+2)){ cout << i << " " << i+2 << endl; } } return 0; }
Main.cc: In function 'int main()':
Main.cc:23:12: error: too few arguments to function 'bool isZS(int, int)'
if(isZS(i) && isZS(i+2)){
^
Main.cc:3:6: note: declared here
bool isZS(int a,int b){
^
Main.cc:23:25: error: too few arguments to function 'bool isZS(int, int)'
if(isZS(i) && isZS(i+2)){
^
Main.cc:3:6: note: declared here
bool isZS(int a,int b){
^