結果
問題 |
No.63 ポッキーゲーム
|
ユーザー |
|
提出日時 | 2017-01-19 19:00:09 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 248 bytes |
コンパイル時間 | 812 ms |
コンパイル使用メモリ | 100,172 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-12 06:30:38 |
合計ジャッジ時間 | 1,613 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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); }