说白了,就是考验你判断 n*x
是否能成为一个帅气的5位数!
解题思路
破案三部曲
-
输入所有样本
-
检查
n*x
是否是5位数 -
狂喜(YES)或悲伤(NO)
温馨提醒
-
别想太复杂
-
代码就是这么简单
-
相信你的智慧!
#include<bits/stdc++.h> using namespace std; int t,n,x; int main() { cin>>t; while(t--){ cin>>n>>x;//scanf==更快 if(n*x>=10000&&n*x<100000){ cout<<"YES"<<endl; } else cout<<"NO"<<endl; } return 0; }