QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#518526#7606. Digital NimkrishnnnnaWA 0ms3700kbC++17647b2024-08-13 21:27:342024-08-13 21:27:34

Judging History

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

  • [2024-08-13 21:27:34]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3700kb
  • [2024-08-13 21:27:34]
  • 提交

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<<"Algosia"<<endl;
        }
        else { cout << "Bajtek" << endl;}
    }
}
int main() {
    ll t ; cin>>t;
    for(int i = 0; i < t;i++){
        solve();
    }
}

詳細信息

Test #1:

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

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'