提交时间:2024-02-01 14:29:51
运行 ID: 39384
#include<iostream> using namespace std; int main(){ int n; cin>>n; if(n%3==0&&n%5==0&&n%7==0){ cout<<"3"<<" "<<"5"<<" "<<"7"; } else { if(n%3==0&&n%5==0){ cout<<"3"<<" "<<"5"; } else{ if(n%5==0&&n%7==0){ cout<<"5"<<" "<<"7"; } else{ if(n%3==0){ cout<<"3"; } else{ if(n%5==0){ cout<<"5"; } else{ if(n%7==0){ cout<<"7"; } else{ cout<<"n"; } } } } } } return 0; }