Files
CodeTest/baekjoon/최댓값/solution_18331462.rs
2024-08-29 16:23:43 +09:00

20 lines
369 B
Rust

use std::io;
fn main(){
let (mut max, mut idx) = (0, 0);
for i in 0..9{
let mut n = String::new();
io::stdin().read_line(&mut n)
.expect("Failed to read line");
let n = n.trim().parse::<u32>().unwrap();
if max < n{
max = n;
idx = i + 1;
}
}
println!("{}\n{}", max, idx);
}