QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#224992#7606. Digital Nimmendicillin2#WA 1ms3424kbC++17993b2023-10-23 20:05:482023-10-23 20:05:48

Judging History

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

  • [2023-10-23 20:05:48]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3424kb
  • [2023-10-23 20:05:48]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
#define int long long

signed main() {
	// ios_base::sync_with_stdio(false), cin.tie(nullptr);
	// f[0]=0;
	// for(int i=1;i<=50000;i++)
	// {
	// 	memset(vis,0,sizeof(vis));
	// 	int k=ask(i);
	// 	for(int j=1;j*10<=k;j++)
	// 		vis[f[i-j]]=true;
	// 	while(vis[f[i]]) f[i]++;
	// }
	// //for(int i=1;i<=200;i++) cout<<f[i]<<" ";
	// //cout<<endl;
	// // for(int i=1;i<=10000;i++)
	// // 	if(f[i])
	// // 		cout<<i<<" ";
	// // cout<<endl;
	// for(int i=20;i<=10000;i++)
	// {
	// 	bool flag1 = f[i]!=0;
	// 	bool flag2 = (f[i-9] || f[i-20]);
	// 	if(flag1!=flag2) 
	// 	{
	// 		cout<<i<<" "<<"yes"<<endl;
	// 		assert(false);
	// 	}
	// }
	int T;
	cin>>T;
	int x;
	while(T--)
	{
		cin>>x;
		if(x%10!=0)
		{
			cout<<"Algosia"<<"\n";
		}
		else 
		{
			x/=10;
			int w=0;
			while(x) w+=x%10, x/=10;
			if(w>=10 && w%2==0) cout<<"Algosia"<<"\n";
			else cout<<"Bajtek"<<"\n";
		}
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3424kb

input:

4
1
10
42
190

output:

Algosia
Bajtek
Algosia
Algosia

result:

ok 4 lines

Test #2:

score: 0
Accepted
time: 0ms
memory: 3380kb

input:

1
1

output:

Algosia

result:

ok single line: 'Algosia'

Test #3:

score: -100
Wrong Answer
time: 0ms
memory: 3380kb

input:

10000
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
10...

output:

Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Bajtek
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Bajtek
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Bajtek
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia...

result:

wrong answer 1900th lines differ - expected: 'Bajtek', found: 'Algosia'