| Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|---|
| 444054 | 任虞昊 | 【C1-12】判断能否被3,5,7整除 | C++ | 通过 | 100 | 1 MS | 252 KB | 396 | 2026-06-09 20:47:25 |
#include<iostream> using namespace std; int main(){ int x; cin>>x; if(x%7==0&&x%5==0&&x%3==0){ cout<<"3 5 7"; }else if(x%3==0&&x%5==0){ cout<<"3 5"; }else if(x%3==0&&x%7==0){ cout<<"3 7"; }else if(x%5==0&&x%7==0){ cout<<"5 7"; }else if(x%7==0){ cout<<"7"; }else if(x%5==0){ cout<<"5"; }else if(x%3==0){ cout<<"3"; }else{ cout<<"n"; } return 0; }