結果
| 問題 | 
                            No.99 ジャンピング駒
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2024-05-14 18:35:07 | 
| 言語 | Rust  (1.83.0 + proconio)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 7 ms / 5,000 ms | 
| コード長 | 277 bytes | 
| コンパイル時間 | 13,256 ms | 
| コンパイル使用メモリ | 401,572 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-12-20 10:02:36 | 
| 合計ジャッジ時間 | 14,005 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 6 | 
ソースコード
use std::io::Read;
fn main() {
	let mut s = String::new();
	std::io::stdin().read_to_string(&mut s).ok();
	let mut a = 0i32;
	s.split_whitespace()
		.skip(1)
		.flat_map(str::parse::<i32>)
		.for_each(|x| if x % 2 == 0 { a += 1 } else { a -= 1 });
	println!("{}", a.abs());
}