- 判断一个数能否同时被3和5整除
key
- @ 2025-7-17 14:33:09
#include<iostream>
using namespace std;
int main(){
int a;
cin>>a;
if(a%15==0){
cout<<"YES";
}
else{
cout<<"NO";
}
return 0;
}
1 条评论
-
吕梓锐 LV 7 @ 2025-9-19 15:59:52已修改答案
#include <bits/stdc++.h>
using namespace std; int main(){ int n; cin >> n; if(n%3==0 && n%5==0){ cout << "YES"; } else cout << "NO"; return 0; }🤡 2
- 1
信息
- ID
- 50
- 时间
- ms
- 内存
- MiB
- 难度
- 4
- 标签
- 递交数
- 232
- 已通过
- 104
- 上传者