QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#518402#7606. Digital NimkrishnnnnaWA 0ms3592kbC++17647b2024-08-13 20:12:492024-08-13 20:12:49

Judging History

你现在查看的是最新测评结果

  • [2024-08-13 20:12:49]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3592kb
  • [2024-08-13 20:12:49]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
void solve() {
    int  n ; cin>>n; ll sum=0;
    int s = n;
    while(n>0){
        int x = n%10;
        sum+=x;
        n/=10;
    }
    int y = s/sum;
            cout<<y<<endl;
    if((s%sum)==0){
        if((y%2)==0){
            cout<<"Bajtek"<<endl;
        }
        else { cout << "Algosia" << endl;}
    }
    else{
        y = y+1;
        if((y%2)==0){
            cout<<"Bajtek"<<endl;
        }
        else { cout << "Algosia" << endl;}
    }
}
int main() {
    ll t ; cin>>t;
    for(int i = 0; i < t;i++){
        solve();
    }
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3592kb

input:

4
1
10
42
190

output:

1
Algosia
10
Bajtek
7
Algosia
19
Algosia

result:

wrong answer 1st lines differ - expected: 'Algosia', found: '1'