結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
splash9494
|
| 提出日時 | 2020-05-04 00:00:08 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 47 ms / 5,000 ms |
| コード長 | 307 bytes |
| コンパイル時間 | 623 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 52,224 KB |
| 最終ジャッジ日時 | 2024-06-23 05:29:19 |
| 合計ジャッジ時間 | 2,407 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
import sys
import math
input = sys.stdin.buffer.readline
X = int(input())
Y = int(input())
L = int(input())
cnt = 0
if Y < 0:
cnt += 2
elif Y >= 0 and X != 0:
cnt += 1
X, Y = map(abs, [X, Y])
cnt += X // L + 1 if X % L != 0 else X // L
cnt += Y // L + 1 if Y % L != 0 else Y // L
print(cnt)
splash9494