結果

問題 No.55 正方形を描くだけの簡単なお仕事です。
ユーザー バカらっくバカらっく
提出日時 2019-09-12 08:08:58
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 515 bytes
コンパイル時間 203 ms
コンパイル使用メモリ 10,884 KB
実行使用メモリ 7,996 KB
最終ジャッジ日時 2023-09-15 14:06:15
合計ジャッジ時間 1,567 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,800 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 16 ms
7,736 KB
testcase_05 AC 16 ms
7,852 KB
testcase_06 AC 16 ms
7,876 KB
testcase_07 AC 16 ms
7,824 KB
testcase_08 AC 15 ms
7,796 KB
testcase_09 AC 16 ms
7,876 KB
testcase_10 AC 16 ms
7,852 KB
testcase_11 WA -
testcase_12 AC 15 ms
7,900 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 15 ms
7,880 KB
testcase_16 WA -
testcase_17 AC 15 ms
7,784 KB
testcase_18 AC 16 ms
7,824 KB
testcase_19 AC 16 ms
7,836 KB
testcase_20 WA -
testcase_21 AC 15 ms
7,736 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8

allXY = [int(i) for i in input().rstrip().split(" ")]
xList = [x for (index, x) in enumerate(allXY) if index % 2 == 0]
yList = [y for (index, y) in enumerate(allXY) if index % 2 == 1]

canSquare = True
if len(set(xList)) != 2 or len(set(yList)) != 2:
    canSquare = False

ans = -1
if canSquare:
    x = [p for p in xList if len([sub for sub in xList if sub == p]) == 1][0]
    y = [p for p in yList if len([sub for sub in yList if sub == p]) == 1][0]
    ans = str(x) + " " + str(y)

print(ans)

0