QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#518402 | #7606. Digital Nim | krishnnnna | WA | 0ms | 3592kb | C++17 | 647b | 2024-08-13 20:12:49 | 2024-08-13 20:12:49 |
Judging History
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'