結果

問題 No.410 出会い
ユーザー R NR N
提出日時 2020-11-21 11:40:25
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 42 ms / 2,000 ms
コード長 481 bytes
コンパイル時間 69 ms
コンパイル使用メモリ 10,932 KB
実行使用メモリ 7,976 KB
最終ジャッジ日時 2023-09-30 21:42:37
合計ジャッジ時間 1,527 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
7,856 KB
testcase_01 AC 19 ms
7,976 KB
testcase_02 AC 21 ms
7,760 KB
testcase_03 AC 23 ms
7,784 KB
testcase_04 AC 20 ms
7,788 KB
testcase_05 AC 23 ms
7,788 KB
testcase_06 AC 20 ms
7,844 KB
testcase_07 AC 21 ms
7,824 KB
testcase_08 AC 18 ms
7,960 KB
testcase_09 AC 25 ms
7,804 KB
testcase_10 AC 19 ms
7,804 KB
testcase_11 AC 16 ms
7,828 KB
testcase_12 AC 15 ms
7,924 KB
testcase_13 AC 16 ms
7,832 KB
testcase_14 AC 20 ms
7,780 KB
testcase_15 AC 15 ms
7,924 KB
testcase_16 AC 16 ms
7,856 KB
testcase_17 AC 15 ms
7,760 KB
testcase_18 AC 15 ms
7,852 KB
testcase_19 AC 42 ms
7,800 KB
testcase_20 AC 28 ms
7,788 KB
testcase_21 AC 29 ms
7,920 KB
testcase_22 AC 41 ms
7,820 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding=utf-8:

a = list(map(int, input().split()))
b = list(map(int, input().split()))

x_a = a[0]
x_b = b[0]
y_a = a[1]
y_b = b[1]

x_ab = abs(x_a - x_b) / 2 
y_ab = abs(y_a - y_b) / 2

i = 0.0
j  = 0.0
k = 0.0
l = 0.0
while True:
    if x_ab <= 2:
        break
    else:
        i += 1.0
        j += 1.0
        x_ab -= 2


while True:
    if y_ab <= 2:
        break
    else:
        i += 1.0
        j += 1.0
        y_ab -= 2

k = x_ab
l = y_ab

print(i + j + k + l)
    
0