QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#115156#5850. Candy Storeyoungsystem0 9ms3752kbC++20530b2023-06-24 18:15:592023-06-24 18:16:03

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-06-24 18:16:03]
  • 评测
  • 测评结果:0
  • 用时:9ms
  • 内存:3752kb
  • [2023-06-24 18:15:59]
  • 提交

answer

#include<bits/stdc++.h>
#define int long long
using namespace std;
inline int read()
{
	int n=0,f=1,ch=getchar();
	while(ch<'0'||ch>'9')
	{
		if(ch=='-')f=-1;
		ch=getchar();
	}
	while(ch>='0'&&ch<='9')
	{
		n=n*10+ch-'0';
		ch=getchar();
	}
	return n*f;
}
signed main()
{
	int t,k,n;
	t=read();
	for(int greg=1;greg<=t;greg++)
	{
		k=read();
		n=read();
		int ans=0;
		int now=0;
		while(now<=k*n)
		{
			now+=now/k+1;
			ans++;	
		}
		printf("Case #%lld: %lld\n",greg,ans);
	} 
	return 0;
}

詳細信息

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3524kb

input:

100
2 3
3 3
13 1
20 2
6 3
5 3
3 1
7 2
15 1
4 3
1 1
14 3
1 3
17 1
10 2
12 2
9 1
14 1
5 2
6 3
13 2
18 2
17 3
2 3
18 3
16 1
19 2
17 1
11 3
20 3
3 1
8 3
7 3
18 1
11 2
20 3
7 2
4 3
1 2
7 2
10 1
17 3
5 2
14 1
2 1
3 1
4 1
17 2
8 2
5 1
18 1
8 1
15 3
10 2
6 2
20 1
15 3
1 3
3 2
17 1
14 1
3 2
9 3
16 3
15 2
12 ...

output:

Case #1: 4
Case #2: 6
Case #3: 14
Case #4: 31
Case #5: 12
Case #6: 10
Case #7: 4
Case #8: 11
Case #9: 16
Case #10: 8
Case #11: 2
Case #12: 26
Case #13: 3
Case #14: 18
Case #15: 16
Case #16: 19
Case #17: 10
Case #18: 15
Case #19: 8
Case #20: 12
Case #21: 20
Case #22: 28
Case #23: 32
Case #24: 4
Case ...

result:

wrong answer 3rd lines differ - expected: 'Case #3: 13', found: 'Case #3: 14'

Subtask #2:

score: 0
Wrong Answer

Test #2:

score: 0
Wrong Answer
time: 9ms
memory: 3752kb

input:

100
984 4
830 901580635835
937 117926240831
1000 62009
1000 11
656 187600851857
577 732239839666
149 276944
401 126493510574
1000 696570219424
765 796394824105
422 120213965166
686 140
1000 431774067439
106 351578631166
374 279760528652
1 1000000000000
1000 134489424902
25 909266561260
402 333089014...

output:

Case #1: 2051
Case #2: 23340
Case #3: 24441
Case #4: 11617
Case #5: 3021
Case #6: 17420
Case #7: 16110
Case #8: 1960
Case #9: 10495
Case #10: 27860
Case #11: 21419
Case #12: 11023
Case #13: 3790
Case #14: 27381
Case #15: 2892
Case #16: 10087
Case #17: 40
Case #18: 26215
Case #19: 717
Case #20: 10911...

result:

wrong answer 1st lines differ - expected: 'Case #1: 2050', found: 'Case #1: 2051'