Update solution for A+B_-_4 w/ id 18474280

Time: 4ms
MemUsage: 13036KB
This commit is contained in:
2024-08-29 16:23:42 +09:00
parent 0df8e0e46a
commit 08623706b8

View File

@@ -0,0 +1,18 @@
use std::io;
fn main(){
loop{
let mut line = String::new();
let byte = io::stdin().read_line(&mut line).expect("Failed to read line");
if byte <= 1{ // only '\n' is input
break;
}
let inputs: Vec<u32> = line.trim().split(" ")
.map(|x| x.parse().expect("Not an integer!"))
.collect();
println!("{}", inputs[0] + inputs[1]);
}
}