This commit is contained in:
2025-02-03 20:03:38 -05:00
parent 0ca31017b2
commit 74489c43b6
3 changed files with 17 additions and 28 deletions

View File

@@ -22,7 +22,7 @@ impl Agent for ManualAgent {
stdin.lock().read_line(&mut input).ok()?;
let numbers = input
.split_whitespace()
.map(|i| usize::from_str_radix(i, 10).ok())
.map(|i| i.parse::<usize>().ok())
.collect::<Option<Vec<usize>>>();
if let Some(numbers) = numbers {
if numbers.len() == 2 {