Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
330318 钟宜辰 【C5-1】找数游戏 C++ 解答错误 0 15 MS 244 KB 390 2025-07-09 16:30:48

Tests(0/1):


#include<bits/stdc++.h> using namespace std; int sb(int x){ int a=0,b=0,c=0; a=x/100%10; b=x/10%10; c=x/1%10; if(a+b==1){ return 0; } for(int i=2;i<=9;i++){ if(a+b==i && (a+b)%i==0){ return 0; } } if(b>a+c){ return x; } else{ return 0; } } int main(){ for(int i=100;i<=999;i++){ if(sb(i)){ cout<<i<<endl; } } return 0; }


测评信息: