Submission details
Task:Skittles
Sender:aalto26km_043
Submission time:2026-11-16 16:58:02 +0200
Language:Rust (2021)
Status:READY
Result:
Test results
testverdicttime
#10.00 sdetails
#20.00 sdetails
#30.00 sdetails
#40.00 sdetails
#50.00 sdetails
#60.00 sdetails
#70.00 sdetails
#80.00 sdetails
#90.00 sdetails
#100.00 sdetails
#110.00 sdetails
#120.00 sdetails
#130.00 sdetails
#140.00 sdetails
#150.00 sdetails
#160.00 sdetails
#170.00 sdetails
#180.00 sdetails
#190.00 sdetails
#200.00 sdetails
#210.00 sdetails
#220.00 sdetails
#230.00 sdetails
#240.00 sdetails
#250.00 sdetails
#260.00 sdetails
#270.00 sdetails
#280.00 sdetails
#290.00 sdetails
#300.00 sdetails
#310.00 sdetails
#320.00 sdetails
#330.00 sdetails
#340.00 sdetails
#350.00 sdetails
#360.00 sdetails
#370.00 sdetails
#380.00 sdetails
#390.00 sdetails
#400.00 sdetails
#410.00 sdetails
#420.00 sdetails
#430.00 sdetails
#440.00 sdetails
#450.00 sdetails
#460.00 sdetails
#470.00 sdetails
#480.00 sdetails
#490.00 sdetails
#500.00 sdetails
#510.00 sdetails
#520.00 sdetails
#530.00 sdetails
#540.00 sdetails
#550.00 sdetails
#560.00 sdetails
#570.00 sdetails
#580.00 sdetails
#590.00 sdetails
#600.00 sdetails
#610.00 sdetails
#620.00 sdetails
#630.00 sdetails

Code

#![allow(unused)]

use std::collections::*;
use std::io::{self, Read, Write};

fn gcd(mut a: u64, mut b: u64) -> u64 {
    while b != 0 {
        (a, b) = (b, a % b);
    }
    a
}

fn main() {
    let mut input = String::new();
    io::stdin().read_to_string(&mut input).unwrap();
    let mut it = input.split_ascii_whitespace().map(|x| x.parse::<u64>().unwrap());

    let n = it.next().unwrap();
    let q = it.next().unwrap();

    let out = io::stdout();
    let mut out = io::BufWriter::new(out.lock());
    for _ in 0..q {
        let k = it.next().unwrap();
        let _s = it.next().unwrap();
        writeln!(out, "{}", n / gcd(n, k % n)).unwrap();
    }
}

Test details

Test 1

Verdict:

input
1 1 10

correct output
10

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 2

Verdict:

input
2 3 3

correct output
4

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 3

Verdict:

input
2 4 5

correct output
11

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 4

Verdict:

input
3 4 5

correct output
36

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 5

Verdict:

input
3 2 2

correct output
6

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 6

Verdict:

input
5 5 5

correct output
126

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 7

Verdict:

input
10 10 10

correct output
92378

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 8

Verdict:

input
10 1 10

correct output
184755

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 9

Verdict:

input
100 100 100

correct output
866655715

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 10

Verdict:

input
10 100 100

correct output
918123961

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 11

Verdict:

input
1000 10 10

correct output
84965120

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 12

Verdict:

input
10000 10000 10000

correct output
658363258

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 13

Verdict:

input
100000 100000 100000

correct output
966937032

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 14

Verdict:

input
54883 59286 71521

correct output
908996595

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 15

Verdict:

input
41703 72034 99721

correct output
139159644

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 16

Verdict:

input
43601 2593 18509

correct output
804369499

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 17

Verdict:

input
55081 7073 70816

correct output
806880502

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 18

Verdict:

input
96705 54725 90064

correct output
521461113

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 19

Verdict:

input
22200 5519 87075

correct output
866679044

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 20

Verdict:

input
89288 33199 94750

correct output
812654801

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 21

Verdict:

input
7631 22735 77994

correct output
30255908

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 22

Verdict:

input
87345 1112 96856

correct output
944788802

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 23

Verdict:

input
1038 36447 50189

correct output
654272260

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 24

Verdict:

input
41703 72034 99721

correct output
139159644

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 25

Verdict:

input
18028 1948 6831

correct output
631722506

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 26

Verdict:

input
4873 28912 79929

correct output
106074189

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 27

Verdict:

input
28606 2900 95813

correct output
538554734

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 28

Verdict:

input
25093 4610 68059

correct output
799962519

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 29

Verdict:

input
67575 4472 32712

correct output
857647130

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 30

Verdict:

input
82449 18136 86245

correct output
420446937

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 31

Verdict:

input
18558 38661 75914

correct output
924425479

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 32

Verdict:

input
35543 34086 47960

correct output
210554536

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 33

Verdict:

input
20101 32903 99080

correct output
88647511

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 34

Verdict:

input
18028 1948 6831

correct output
631722506

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 35

Verdict:

input
61218 12076 16908

correct output
820171450

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 36

Verdict:

input
78139 13111 69284

correct output
904117059

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 37

Verdict:

input
45455 2862 43952

correct output
430742811

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 38

Verdict:

input
84538 61888 77158

correct output
294818599

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 39

Verdict:

input
26937 59685 80971

correct output
680140546

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 40

Verdict:

input
30632 9727 88573

correct output
877318826

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 41

Verdict:

input
55737 66074 71002

correct output
123569267

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 42

Verdict:

input
59351 587 51636

correct output
122513346

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 43

Verdict:

input
8954 7866 51810

correct output
961929284

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 44

Verdict:

input
61218 12076 16908

correct output
820171450

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 45

Verdict:

input
9556 43003 92502

correct output
424034313

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 46

Verdict:

input
20433 945 23474

correct output
794687216

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 47

Verdict:

input
9941 45344 78340

correct output
875489658

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 48

Verdict:

input
82532 68582 70655

correct output
238007640

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 49

Verdict:

input
52729 37586 66259

correct output
93243919

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 50

Verdict:

input
10475 17392 24871

correct output
977605482

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 51

Verdict:

input
76232 88012 95143

correct output
871309467

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 52

Verdict:

input
77184 58424 64500

correct output
693972156

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 53

Verdict:

input
96888 47083 55295

correct output
406195062

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 54

Verdict:

input
9556 43003 92502

correct output
424034313

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 55

Verdict:

input
83891 47894 87748

correct output
686766192

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 56

Verdict:

input
85080 21779 92819

correct output
114946782

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 57

Verdict:

input
88235 6779 56603

correct output
70147249

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 58

Verdict:

input
88858 66896 98375

correct output
601764178

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 59

Verdict:

input
50586 8901 76084

correct output
881324074

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 60

Verdict:

input
87594 26882 34225

correct output
42681251

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 61

Verdict:

input
73130 30310 55103

correct output
843664756

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 62

Verdict:

input
63584 31874 92876

correct output
437812641

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test 63

Verdict:

input
88714 2531 74051

correct output
603847190

user output
(empty)

Error:
thread 'main' panicked at input/code.rs:25:28:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace