break和return重要性就体现在这
2024-08-21 10:42:27
发布于:云南
2阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int main(){
int n; cin >> n;
for(int i = 1;i <= n;i++){
for(int j = i;j <= n;j++){
int k = n - i - j;
if(k <= j) break;
if(i % 3 == 0 || j % 3 == 0 || k % 3 == 0) continue;
else{
cout << "YES\n" << i << " " << j << " " << k;
return 0;
}
}
}
cout << "NO";
return 0;
}
这里空空如也
有帮助,赞一个