80分,第四个测试点错了
查看原帖
80分,第四个测试点错了
742482
Yu09217777楼主2022/9/3 21:36
#include <bits/stdc++.h>
using namespace std;
int main(){
	long long num,x,y,z;
	cin >> num;
	x = num % 3;
	y = num % 5;
	z = num % 7;
	if (x == 0){
		if (y == 0){
			if (z == 0){
				cout << "3 5 7";
			}else{
				cout << "3 5";
			}
		}else{
			cout << "3";
		} 
	}else{
		if (y == 0){
			if (z == 0){
				cout << "5 7";
			}else{
				cout << "5";
			}
		}else{
			if (z == 0){
				cout << "7";
			}else{
				cout << "n";
			}
		}
	}
	return 0;
}
2022/9/3 21:36
加载中...