結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
penicillin0
|
| 提出日時 | 2019-03-05 03:16:29 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 397 bytes |
| コンパイル時間 | 84 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-06-23 14:08:10 |
| 合計ジャッジ時間 | 1,745 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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