結果
問題 | No.99 ジャンピング駒 |
ユーザー |
![]() |
提出日時 | 2022-10-19 00:53:32 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 21 ms / 5,000 ms |
コード長 | 210 bytes |
コンパイル時間 | 2,469 ms |
コンパイル使用メモリ | 209,016 KB |
実行使用メモリ | 7,832 KB |
最終ジャッジ日時 | 2024-06-22 16:23:29 |
合計ジャッジ時間 | 3,136 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
import std;void main() {int N;readf("%d\n", N);auto X = readln.chomp.split.to!(int[]);int cnt;foreach (x; X) cnt += (x % 2 == 0 ? 1 : -1);int res = cnt.abs;res.writeln;}