結果
| 問題 | No.48 ロボットの操縦 |
| コンテスト | |
| ユーザー |
penicillin0
|
| 提出日時 | 2019-03-05 03:16:29 |
| 言語 | Python3 (3.14.3 + numpy 2.4.2 + scipy 1.17.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 397 bytes |
| 記録 | |
| コンパイル時間 | 526 ms |
| コンパイル使用メモリ | 20,952 KB |
| 実行使用メモリ | 15,484 KB |
| 最終ジャッジ日時 | 2026-03-08 09:41:49 |
| 合計ジャッジ時間 | 4,106 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 WA * 1 |
ソースコード
X, Y, L = int(input()), int(input()), int(input())
ans = 0
if X == Y == 0:
print(0)
exit()
if X == 0 and Y > 0:
ans += 0
elif Y > 0:
ans += 1
else:
ans += 2
X_count, Y_count = 0, 0
if abs(X) % L == 0:
X_count = abs(X) // L
else:
X_count = abs(X) // L + 1
if abs(Y) % L == 0:
Y_count = abs(Y) // L
else:
Y_count = abs(Y) // L + 1
print(ans+X_count+Y_count)
penicillin0