結果
問題 | No.99 ジャンピング駒 |
ユーザー | te-sh |
提出日時 | 2016-08-27 17:51:37 |
言語 | D (dmd 2.106.1) |
結果 |
AC
|
実行時間 | 20 ms / 5,000 ms |
コード長 | 317 bytes |
コンパイル時間 | 644 ms |
コンパイル使用メモリ | 91,944 KB |
実行使用メモリ | 6,736 KB |
最終ジャッジ日時 | 2023-09-02 21:28:30 |
合計ジャッジ時間 | 1,486 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 20 ms
6,420 KB |
testcase_01 | AC | 20 ms
6,104 KB |
testcase_02 | AC | 19 ms
6,736 KB |
testcase_03 | AC | 20 ms
6,644 KB |
testcase_04 | AC | 19 ms
6,100 KB |
testcase_05 | AC | 19 ms
6,172 KB |
ソースコード
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); }