結果
| 問題 | No.99 ジャンピング駒 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-01-27 15:25:13 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
AC
|
| 実行時間 | 23 ms / 5,000 ms |
| コード長 | 294 bytes |
| 記録 | |
| コンパイル時間 | 899 ms |
| コンパイル使用メモリ | 104,832 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-12 06:39:00 |
| 合計ジャッジ時間 | 1,862 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
ソースコード
import std.algorithm, std.conv, std.range, std.stdio, std.string;
import std.math; // math functions
void main()
{
auto n = readln.chomp.to!size_t;
auto xi = readln.split.to!(int[]);
auto buf = new int[](2);
foreach (x; xi) ++buf[x.abs % 2];
writeln((buf[0] - buf[1]).abs);
}