题解
【入门】贝贝的选择
1 条题解
-
0
#include <iostream> using namespace std; int main(){ int n,x=0; cin>>n; for(int i=1;i<=n;i++){ int g=i%10;//个位 int s=i/10%10;//十位 int b=i/100%10;//百位 if(g==6||s==6||b==6){ x++;//统计含有6的数有几个 } } if(x%2==0){//个数是偶数 cout<<"playground"; }else{ cout<<"library"; } return 0; }
- 1