Created
December 14, 2025 02:26
-
-
Save icub3d/8e56f7a72459450f79d87331a1efdb1b to your computer and use it in GitHub Desktop.
Kattis cold
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(); | |
| for m in s.lines().skip(1) { | |
| println!( | |
| "{}", | |
| m.split_whitespace() | |
| .map(|v| v.parse::<isize>().unwrap()) | |
| .filter(|v| *v < 0) | |
| .count() | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment