CSES - Datatähti 2022 alku - Results
Submission details
Task:Karkit
Sender:waltteri
Submission time:2021-10-13 23:04:10
Language:Node.js
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#10.44 sdetails
#20.44 sdetails
#30.44 sdetails
#40.44 sdetails
#50.44 sdetails

Code

// @ts-check
const { createInterface } = require('readline');
const { stdin, stdout } = require('process');

(async () => {
    const reader = createInterface({
        input: stdin,
        output: stdout,
        terminal: false,
    });

    /** @returns {Promise<number>} */
    const input = () =>
        new Promise(resolve =>
            reader.question('', answer => resolve(parseInt(answer)))
        );

    const n = await input(),
        a = await input(),
        b = await input();

    const smaller = a < b ? a : b;

    const ans = Math.trunc(n / smaller);

    console.info(ans);

    reader.close();
})();

Test details

Test 1

Verdict:

input
100
1
1

correct output
100

user output
(empty)

Test 2

Verdict:

input
1
100
100

correct output
0

user output
(empty)

Test 3

Verdict:

input
50
2
3

correct output
25

user output
(empty)

Test 4

Verdict:

input
100
17
3

correct output
33

user output
(empty)

Test 5

Verdict:

input
5
5
5

correct output
1

user output
(empty)