結果

問題 No.55 正方形を描くだけの簡単なお仕事です。
ユーザー あかりきあかりき
提出日時 2021-02-08 11:30:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 76 ms / 5,000 ms
コード長 421 bytes
コンパイル時間 601 ms
コンパイル使用メモリ 87,152 KB
実行使用メモリ 71,464 KB
最終ジャッジ日時 2023-09-18 17:51:23
合計ジャッジ時間 3,288 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
70,932 KB
testcase_01 AC 76 ms
71,140 KB
testcase_02 AC 75 ms
71,212 KB
testcase_03 AC 74 ms
71,076 KB
testcase_04 AC 75 ms
71,432 KB
testcase_05 AC 73 ms
71,144 KB
testcase_06 AC 74 ms
71,408 KB
testcase_07 AC 76 ms
71,232 KB
testcase_08 AC 76 ms
70,924 KB
testcase_09 AC 74 ms
71,208 KB
testcase_10 AC 76 ms
71,248 KB
testcase_11 AC 75 ms
71,464 KB
testcase_12 AC 74 ms
71,356 KB
testcase_13 AC 75 ms
71,248 KB
testcase_14 AC 75 ms
71,396 KB
testcase_15 AC 76 ms
71,408 KB
testcase_16 AC 76 ms
71,464 KB
testcase_17 AC 75 ms
71,208 KB
testcase_18 AC 76 ms
71,100 KB
testcase_19 AC 75 ms
71,096 KB
testcase_20 AC 75 ms
71,364 KB
testcase_21 AC 76 ms
71,252 KB
testcase_22 AC 76 ms
71,156 KB
testcase_23 AC 75 ms
71,116 KB
testcase_24 AC 73 ms
71,440 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

x1,y1,x2,y2,x3,y3=map(int,input().split())
if (x2-x1)**2+(y2-y1)**2==(x3-x1)**2+(y3-y1)**2 and (x2-x1)*(x3-x1)+(y2-y1)*(y3-y1)==0:
  print(x3+(x2-x1),y3+(y2-y1))
elif (x3-x2)**2+(y3-y2)**2==(x1-x2)**2+(y1-y2)**2 and (x3-x2)*(y3-y2)+(x1-x2)*(y1-y2)==0:
  print(x1+(x3-x2),y1+(y3-y2))
elif (x1-x3)**2+(y1-y3)**2==(x2-x3)**2+(y2-y3)**2 and (x1-x3)*(y1-y3)+(x2-x3)*(y2-y3)==0:
  print(x2+(x1-x3),y2+(y1-y3))
else:
  print(-1)
0