| Task: | Kortit |
| Sender: | ToukoP |
| Submission time: | 2022-11-08 22:12:08 +0200 |
| Language: | Rust |
| Status: | READY |
| Result: | 0 |
| group | verdict | score |
|---|---|---|
| #1 | RUNTIME ERROR | 0 |
| test | verdict | time | |
|---|---|---|---|
| #1 | RUNTIME ERROR | 0.00 s | details |
| #2 | RUNTIME ERROR | 0.00 s | details |
| #3 | RUNTIME ERROR | 0.00 s | details |
| #4 | RUNTIME ERROR | 0.00 s | details |
| #5 | RUNTIME ERROR | 0.00 s | details |
| #6 | RUNTIME ERROR | 0.00 s | details |
Compiler report
warning: function is never used: `read_line`
--> input/code.rs:3:4
|
3 | fn read_line() -> String {
| ^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: 1 warning emittedCode
fn read_line() -> String {
let mut line = String::new();
std::io::stdin().read_line(&mut line).unwrap();
line
}
fn read_num() -> i32 {
let mut line = String::new();
std::io::stdin().read_line(&mut line).unwrap();
let int: i32 = line.trim().parse().unwrap();
int
}
fn run() {
let count = 52;
let colors = 2;
let n = read_num();
if n > count / colors {
return println!("YES")
}
if n <= colors {
return println!("NO")
}
println!("MAYBE");
}
fn main() {
loop { run() }
}
Test details
Test 1
Verdict: RUNTIME ERROR
| input |
|---|
| 0 |
| correct output |
|---|
| NO |
| user output |
|---|
| NO |
Error:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseIntError { ki...Test 2
Verdict: RUNTIME ERROR
| input |
|---|
| 1 |
| correct output |
|---|
| NO |
| user output |
|---|
| NO |
Error:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseIntError { ki...Test 3
Verdict: RUNTIME ERROR
| input |
|---|
| 2 |
| correct output |
|---|
| MAYBE |
| user output |
|---|
| NO |
Error:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseIntError { ki...Test 4
Verdict: RUNTIME ERROR
| input |
|---|
| 26 |
| correct output |
|---|
| MAYBE |
| user output |
|---|
| MAYBE |
Error:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseIntError { ki...Test 5
Verdict: RUNTIME ERROR
| input |
|---|
| 27 |
| correct output |
|---|
| YES |
| user output |
|---|
| YES |
Error:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseIntError { ki...Test 6
Verdict: RUNTIME ERROR
| input |
|---|
| 52 |
| correct output |
|---|
| YES |
| user output |
|---|
| YES |
Error:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseIntError { ki...