提交时间:2021-05-16 20:47:53
运行 ID: 19593
#include<bits/stdc++.h> using namespace std; int n,a; int main(){ cin>>n; for(int i=2;i<=30;i++){ if(i%2==0) a++; else if(i%2!=0&&i%3==0) a++; else if(i%2!=0&&i%3!=0&&i%5==0) a++; else if(i%2!=0&&i%3!=0&&i%5!=0&&i%7==0) a++; if(a==n){ cout<<i; return 0; } } return 0; }