Submission #1997421
Source Code Expand
fn main() { let scan = std::io::stdin(); let mut line = String::new(); let _ = scan.read_line(&mut line); let vec: Vec<&str> = line.split_whitespace().collect(); let a: i32 = vec[0].parse().unwrap(); let b: i32 = vec[1].parse().unwrap(); if (a+b)%2==0 { println!("{}", (a+b)/2); } else { println!("{}", (a+b)/2+1); }; }
Submission Info
Submission Time | |
---|---|
Task | A - Round Up the Mean |
User | kivantium |
Language | Rust (1.15.1) |
Score | 100 |
Code Size | 395 Byte |
Status | AC |
Exec Time | 2 ms |
Memory | 4352 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 0_00.txt, 0_01.txt, 0_02.txt |
All | 0_00.txt, 0_01.txt, 0_02.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0_00.txt | AC | 2 ms | 4352 KB |
0_01.txt | AC | 2 ms | 4352 KB |
0_02.txt | AC | 2 ms | 4352 KB |
1_00.txt | AC | 2 ms | 4352 KB |
1_01.txt | AC | 2 ms | 4352 KB |
1_02.txt | AC | 2 ms | 4352 KB |
1_03.txt | AC | 2 ms | 4352 KB |