求助
查看原帖
求助
367652
Jerrlee✅楼主2022/3/20 12:33

RT,5050 pts

#include<bits/stdc++.h>
using namespace std;
int main(){
    int t;
    cin>>t;
    while(t--){
        int k;
        cin>>k;
        string s;
        cin>>s;
        if(s.length()%k==0){
            long long x;
            stringstream ss;
            ss<<s;
            ss>>x;
            if(x%9==0) cout<<"aya\n";
            else cout<<"baka\n";
        }
        else cout<<"baka\n";
    }
}

人傻了

2022/3/20 12:33
加载中...