Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
747 | 张宸瑞 | 质数的和与积 | C++ | Runtime Error | 1998 MS | 260 KB | 661 | 2023-03-11 15:43:58 |
#include <iostream> using namespace std; int a=-1; int ss(int x){ if(x==1){ return 0; } int sum=0; for(int i=1;i<=x;i++){ if(x%i==0){ sum++; } } if(sum>2){ return 0; } else{ return 1; } } int he(int x){ for(int i=1;i<x;i++){ if(ss(i)==1){ for(int j=1;j<x;j++){ if(ss(j)==1&&j+i==x){ if(i*j>a){ a=i*j; } } } } } } int main() { int s; cin>>s; he(s); cout<<a; return 0; }
Runtime Error:[ERROR] A not allowed system call. Call ID:275