結果
問題 | No.55 正方形を描くだけの簡単なお仕事です。 |
ユーザー |
![]() |
提出日時 | 2017-06-14 17:10:45 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 11 ms / 5,000 ms |
コード長 | 481 bytes |
コンパイル時間 | 152 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-24 21:02:09 |
合計ジャッジ時間 | 1,394 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 21 |
ソースコード
def func(x,y,x1,y1,x2,y2):v1x = x1-xv1y = y1-yv2x = x2-xv2y = y2-yif v1x**2 + v1y**2 == v2x**2 + v2y**2 and v1x * v2x + v1y * v2y == 0:return (x+v1x+v2x, y+v1y+v2y)else:return -1x1,y1,x2,y2,x3,y3 = map(int, raw_input().split())t = func(x1,y1,x2,y2,x3,y3)u = func(x2,y2,x1,y1,x3,y3)v = func(x3,y3,x1,y1,x2,y2)if t != -1:print t[0],t[1]elif u != -1:print u[0],u[1]elif v != -1:print v[0],v[1]else:print -1