题解:CF2043B Digits
1 . 是否为
2 . 是否为
3 . 是否为
4 . 是否为
5 . 是否为
Code
#include <iostream>
using namespace std;
int main(){
int t;
cin>>t;
for (int i=0;i<t;i++){
int n,d;
cin>>n>>d;
cout<<1<<" ";
if (n>=3 || d%3==0){
cout<<3<<" ";
}
if (d==5){
cout<<5<<" ";
}
if (n>=3 || d==7){
cout<<7<<" ";
}
if (n>=6 || d==9 || (n>=3 && d%3==0)){
cout<<9<<" ";
}
cout<<endl;
}
return 0;
}