結果

問題 No.587 七対子
ユーザー ThetaTheta
提出日時 2022-10-19 17:17:19
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 301 bytes
コンパイル時間 296 ms
コンパイル使用メモリ 10,612 KB
実行使用メモリ 8,552 KB
最終ジャッジ日時 2023-09-12 06:31:50
合計ジャッジ時間 2,728 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,376 KB
testcase_01 AC 18 ms
8,444 KB
testcase_02 AC 17 ms
8,364 KB
testcase_03 AC 18 ms
8,496 KB
testcase_04 AC 18 ms
8,396 KB
testcase_05 AC 18 ms
8,340 KB
testcase_06 AC 18 ms
8,416 KB
testcase_07 AC 18 ms
8,424 KB
testcase_08 AC 19 ms
8,552 KB
testcase_09 AC 19 ms
8,416 KB
testcase_10 AC 18 ms
8,372 KB
testcase_11 AC 18 ms
8,396 KB
testcase_12 AC 21 ms
8,364 KB
testcase_13 AC 18 ms
8,512 KB
testcase_14 AC 18 ms
8,380 KB
testcase_15 WA -
testcase_16 AC 18 ms
8,392 KB
testcase_17 AC 18 ms
8,364 KB
testcase_18 AC 18 ms
8,364 KB
testcase_19 WA -
testcase_20 AC 19 ms
8,416 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 18 ms
8,384 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 18 ms
8,416 KB
testcase_28 AC 19 ms
8,396 KB
testcase_29 AC 18 ms
8,444 KB
testcase_30 AC 18 ms
8,492 KB
testcase_31 WA -
testcase_32 AC 19 ms
8,464 KB
testcase_33 AC 19 ms
8,380 KB
testcase_34 AC 18 ms
8,340 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter


def main():
    S = input()
    hand_counter = Counter(S)
    hand_comb = hand_counter.most_common(7)
    if hand_comb[0][1] == 2 and hand_comb[-1][1] == 1:
        print(hand_comb[-1][0])
    else:
        print("Impossible")


if __name__ == "__main__":
    main()
0