結果
| 問題 | No.63 ポッキーゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-01-19 19:00:09 |
| 言語 | D (dmd 2.112.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 248 bytes |
| 記録 | |
| コンパイル時間 | 491 ms |
| コンパイル使用メモリ | 82,484 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2026-03-05 11:41:36 |
| 合計ジャッジ時間 | 1,324 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
import std.algorithm, std.conv, std.range, std.stdio, std.string;
void main()
{
auto rd = readln.split.to!(int[]), l = rd[0], k = rd[1];
if (l % 2 == 1 || (l / 2) % k != 0)
writeln(l / 2 / k * k);
else
writeln(l / 2 / k * k - k);
}