結果
問題 | No.740 幻の木 |
ユーザー | mlihua09 |
提出日時 | 2020-09-01 22:03:33 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 34 ms / 2,000 ms |
コード長 | 316 bytes |
コンパイル時間 | 335 ms |
コンパイル使用メモリ | 82,452 KB |
実行使用メモリ | 53,884 KB |
最終ジャッジ日時 | 2024-04-30 20:49:23 |
合計ジャッジ時間 | 1,272 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 34 ms
53,884 KB |
testcase_01 | AC | 32 ms
53,652 KB |
testcase_02 | AC | 32 ms
52,416 KB |
testcase_03 | AC | 32 ms
52,868 KB |
testcase_04 | AC | 32 ms
53,464 KB |
testcase_05 | AC | 32 ms
52,456 KB |
testcase_06 | AC | 32 ms
52,956 KB |
testcase_07 | AC | 32 ms
53,652 KB |
testcase_08 | AC | 33 ms
52,620 KB |
ソースコード
N, M, P, Q = map(int, input().split()) x, N = divmod(N, (12 + Q) * M) if N <= (P - 1) * M: print((N - 1) // M + 1 + x * 12) elif N <= (P - 1) * M + Q * 2 * M: print((N - (P - 1) * M - 1) // (2 * M) + P + x * 12) else: print((N - (P - 1) * M - Q * 2 * M - 1) // M + P + Q + x * 12)