Created
January 20, 2026 16:17
-
-
Save icub3d/c510fd9c646c2f8b71473b0b04e0f8fc to your computer and use it in GitHub Desktop.
Kattis bossbattle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::io::{Read, stdin}; | |
| fn main() { | |
| let mut s = String::new(); | |
| stdin().read_to_string(&mut s).unwrap(); | |
| let n = s.trim().parse::<i32>().unwrap(); | |
| // <= 3 == 1 | |
| println!("{}", (n - 2).max(1)); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment