20 lines
369 B
Rust
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);
|
|
}
|