結果
問題 | No.48 ロボットの操縦 |
ユーザー | yama6k16 |
提出日時 | 2019-11-30 22:28:16 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,468 bytes |
コンパイル時間 | 105 ms |
コンパイル使用メモリ | 10,804 KB |
実行使用メモリ | 8,264 KB |
最終ジャッジ日時 | 2023-08-13 09:49:17 |
合計ジャッジ時間 | 1,585 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 18 ms
8,156 KB |
testcase_01 | AC | 18 ms
8,220 KB |
testcase_02 | AC | 18 ms
8,032 KB |
testcase_03 | AC | 16 ms
8,160 KB |
testcase_04 | AC | 17 ms
8,124 KB |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | AC | 16 ms
8,132 KB |
testcase_08 | AC | 17 ms
8,080 KB |
testcase_09 | AC | 16 ms
8,104 KB |
testcase_10 | AC | 17 ms
8,264 KB |
testcase_11 | AC | 16 ms
8,104 KB |
testcase_12 | AC | 17 ms
8,148 KB |
testcase_13 | AC | 16 ms
8,132 KB |
testcase_14 | AC | 16 ms
8,164 KB |
testcase_15 | AC | 21 ms
8,216 KB |
testcase_16 | AC | 16 ms
8,116 KB |
testcase_17 | AC | 16 ms
8,104 KB |
testcase_18 | AC | 16 ms
8,160 KB |
testcase_19 | AC | 16 ms
8,108 KB |
testcase_20 | AC | 16 ms
8,128 KB |
testcase_21 | AC | 16 ms
8,220 KB |
testcase_22 | AC | 16 ms
8,256 KB |
testcase_23 | AC | 16 ms
8,260 KB |
testcase_24 | AC | 16 ms
8,168 KB |
ソースコード
import math X = int(input()) Y = int(input()) L = int(input()) order = 0 x = abs(X) y = abs(Y) if (X != 0) and (Y > 0): op_x = int(math.floor(x/L)) op_y = int(math.floor(y/L)) order = 1 if x >= L: if x == L * op_x: order += op_x elif x != L * op_x: order += op_x + 1 elif x < L: order += 1 if y >= L: if Y == L * op_y: order += op_y elif Y != L * op_y: order += op_y + 1 elif y < L: order += 1 print(order) elif (X != 0) and (Y < 0): op_x = int(math.floor(x/L)) op_y = int(math.floor(y/L)) order = 2 if x >= L: if x == L * op_x: order += op_x elif x != L * op_x: order += op_x + 1 elif x < L: order += 1 if y >= L: if y == L * op_y: order += op_y elif y != L * op_y: order += op_y + 1 elif y < L: order += 1 print(order) elif (X != 0) and (Y == 0): op_x = int(math.floor(x/L)) if x >= L: if x == L * op_x: order += op_x elif x != L * op_x: order += op_x + 1 elif x < L: order += 1 print(order) else: op_y = int(math.floor(y / L)) if y >= L: if y == L * op_y: order += op_y elif y != L * op_y: order += op_y + 1 else: order += 1 if Y < 0: order += 2 print(order)