結果
| 問題 | No.48 ロボットの操縦 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-03-30 13:43:43 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 108 ms / 5,000 ms |
| + 384µs | |
| コード長 | 551 bytes |
| 記録 | |
| コンパイル時間 | 298 ms |
| コンパイル使用メモリ | 21,540 KB |
| 実行使用メモリ | 16,124 KB |
| 最終ジャッジ日時 | 2026-07-30 04:47:11 |
| 合計ジャッジ時間 | 4,472 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
コンパイルメッセージ
Main.py:22: SyntaxWarning: "is not" with 'int' literal. Did you mean "!="? if x is not 0:
ソースコード
import math
x = int(input())
y = int(input())
l = int(input())
#y方向について
if y%l == 0 :
y_order_times = math.fabs(int(y/l))
else:
y_order_times = math.fabs(int(y/l)) + 1
#x方向について
if x%l == 0 :
x_order_times = math.fabs(int(x/l))
else:
x_order_times = math.fabs(int(x/l)) + 1
#方向転換
if y >= 0 :
if x is not 0:
change_direct = 1
else:
change_direct = 0
else:
change_direct = 2
total_order_times = x_order_times + y_order_times + change_direct
print(int(total_order_times))