結果

問題 No.55 正方形を描くだけの簡単なお仕事です。
ユーザー KudeKude
提出日時 2020-09-07 05:40:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 68 ms / 5,000 ms
コード長 354 bytes
コンパイル時間 1,558 ms
コンパイル使用メモリ 87,044 KB
実行使用メモリ 71,532 KB
最終ジャッジ日時 2023-08-19 16:20:55
合計ジャッジ時間 3,392 ms
ジャッジサーバーID
(参考情報)
judge10 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
71,320 KB
testcase_01 AC 64 ms
71,532 KB
testcase_02 AC 68 ms
71,220 KB
testcase_03 AC 63 ms
71,444 KB
testcase_04 AC 63 ms
71,084 KB
testcase_05 AC 65 ms
71,112 KB
testcase_06 AC 67 ms
71,228 KB
testcase_07 AC 63 ms
71,412 KB
testcase_08 AC 62 ms
71,400 KB
testcase_09 AC 61 ms
71,420 KB
testcase_10 AC 62 ms
71,468 KB
testcase_11 AC 61 ms
71,420 KB
testcase_12 AC 62 ms
71,488 KB
testcase_13 AC 62 ms
71,252 KB
testcase_14 AC 62 ms
71,256 KB
testcase_15 AC 60 ms
71,500 KB
testcase_16 AC 62 ms
71,260 KB
testcase_17 AC 63 ms
71,288 KB
testcase_18 AC 64 ms
71,496 KB
testcase_19 AC 62 ms
71,252 KB
testcase_20 AC 64 ms
71,472 KB
testcase_21 AC 62 ms
71,084 KB
testcase_22 AC 62 ms
71,116 KB
testcase_23 AC 64 ms
71,104 KB
testcase_24 AC 61 ms
71,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

s = list(map(int, input().split()))
p = [(s[i], s[i+1]) for i in range(0, 6, 2)]
from itertools import permutations
for x, y, z in permutations(p):
    xy = (y[0] - x[0], y[1] - x[1])
    yz = (z[0] - y[0], z[1] - y[1])
    if (-xy[1], xy[0]) == yz:
        w = (x[0] + z[0] - y[0], x[1] + z[1] - y[1])
        print(*w)
        break
else:
    print(-1)
0