結果
問題 | No.99 ジャンピング駒 |
ユーザー |
|
提出日時 | 2016-08-27 17:51:37 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 21 ms / 5,000 ms |
コード長 | 317 bytes |
コンパイル時間 | 609 ms |
コンパイル使用メモリ | 102,896 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-12 03:45:18 |
合計ジャッジ時間 | 1,295 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
import std.algorithm, std.array, std.range; import std.string, std.conv; import std.math; import std.stdio, std.typecons; void main() { auto n = readln.chomp.to!int; auto xi = readln.split.map!(to!int); auto ai = new int[2]; foreach (x; xi) { ai[x.abs % 2] += 1; } writeln((ai[0] - ai[1]).abs); }