結果

問題 No.55 正方形を描くだけの簡単なお仕事です。
ユーザー roiti46roiti46
提出日時 2015-02-12 00:22:40
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 442 bytes
コンパイル時間 363 ms
コンパイル使用メモリ 6,616 KB
実行使用メモリ 6,068 KB
最終ジャッジ日時 2023-09-05 23:50:59
合計ジャッジ時間 5,967 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 109 ms
5,928 KB
testcase_01 AC 206 ms
6,068 KB
testcase_02 AC 106 ms
5,968 KB
testcase_03 AC 116 ms
5,892 KB
testcase_04 AC 204 ms
5,804 KB
testcase_05 AC 202 ms
6,056 KB
testcase_06 AC 204 ms
5,816 KB
testcase_07 AC 203 ms
5,984 KB
testcase_08 AC 203 ms
6,024 KB
testcase_09 AC 205 ms
5,892 KB
testcase_10 AC 203 ms
5,988 KB
testcase_11 AC 27 ms
5,808 KB
testcase_12 AC 206 ms
6,012 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 205 ms
5,860 KB
testcase_16 WA -
testcase_17 AC 207 ms
5,932 KB
testcase_18 AC 11 ms
6,012 KB
testcase_19 AC 205 ms
6,012 KB
testcase_20 AC 109 ms
5,888 KB
testcase_21 AC 96 ms
5,812 KB
testcase_22 WA -
testcase_23 AC 164 ms
5,936 KB
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

x0,y0,x1,y1,x2,y2 = map(int,raw_input().split())
flag = False
for x in range(-100,101):
    for y in range(-100,101):
        xy = [[x0,y0],[x1,y1],[x2,y2],[x,y]]
        d = [(xy[i][0]-xy[j][0])**2+(xy[i][1]-xy[j][1])**2 for i in range(4) for j in range(i+1,4)]
        d = sorted(d)
        if d[0] == d[1] == d[2] == d[3] < d[4] == d[5]:
            print x,y
            flag = True
            break
    if flag: break
else:
    print -1
0