QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#90120#3361. Cookie MonsterChatGPTAC ✓3ms3316kbC++302b2023-03-22 13:28:502023-03-22 13:29:04

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-03-22 13:29:04]
  • 评测
  • 测评结果:AC
  • 用时:3ms
  • 内存:3316kb
  • [2023-03-22 13:28:50]
  • 提交

answer

#include <iostream>
using namespace std;

int main() {
    int t;
    cin >> t;
    while (t--) {
        int n, c;
        cin >> n >> c;
        int days = n / c;
        if (n % c != 0) days++; // add one day if there are leftovers
        cout << days << endl;
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 3ms
memory: 3316kb

input:

100
1 1
1000000000 3
4739 4738
5000 4999
999999987 1
999995027 5000
636999046 2321
106394296 3990
335994386 3522
137985578 2192
794863759 1223
248521339 4984
977226666 839
529173555 750
110725930 2173
83358142 276
862820983 302
960100999 2283
694759159 682
151339400 912
958452616 3469
433218487 4432...

output:

1
333333334
2
2
999999987
200000
274451
26666
95399
62950
649930
49864
1164752
705565
50956
302023
2857024
420544
1018709
165943
276291
97748
13611
108629
261139
331555
332187
157711
10546
197532
137872
186665
193494
805
9508
83032
33694
444645
6940179
154312
249521
547117
26901
9533
121905
1974319
...

result:

ok 100 lines

Extra Test:

score: 0
Extra Test Passed