結果

問題 No.548 国士無双
ユーザー brthyyjpbrthyyjp
提出日時 2020-07-10 09:44:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 51 ms / 2,000 ms
コード長 365 bytes
コンパイル時間 243 ms
コンパイル使用メモリ 82,316 KB
実行使用メモリ 53,888 KB
最終ジャッジ日時 2024-04-18 03:19:11
合計ジャッジ時間 2,477 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
53,504 KB
testcase_01 AC 49 ms
53,760 KB
testcase_02 AC 48 ms
53,120 KB
testcase_03 AC 49 ms
53,376 KB
testcase_04 AC 48 ms
53,888 KB
testcase_05 AC 48 ms
53,484 KB
testcase_06 AC 50 ms
53,504 KB
testcase_07 AC 49 ms
53,888 KB
testcase_08 AC 49 ms
53,760 KB
testcase_09 AC 51 ms
53,760 KB
testcase_10 AC 51 ms
53,120 KB
testcase_11 AC 50 ms
53,120 KB
testcase_12 AC 51 ms
53,504 KB
testcase_13 AC 51 ms
53,376 KB
testcase_14 AC 51 ms
53,376 KB
testcase_15 AC 50 ms
53,808 KB
testcase_16 AC 49 ms
53,376 KB
testcase_17 AC 49 ms
53,120 KB
testcase_18 AC 49 ms
53,760 KB
testcase_19 AC 49 ms
53,504 KB
testcase_20 AC 50 ms
53,760 KB
testcase_21 AC 49 ms
53,376 KB
testcase_22 AC 50 ms
53,376 KB
testcase_23 AC 49 ms
53,504 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

s = str(input())
X = [0]*13
for i in range(len(s)):
    X[ord(s[i])-ord('a')] += 1

import copy
Y = copy.copy(X)
Y.sort()
p1 = [0]+[1]*11+[2]
p2 = [1]*13
if Y == p1:
    for i in range(13):
        if X[i] == 0:
            print(chr(i+ord('a')))
            exit()
if Y == p2:
    for i in range(13):
        print(chr(i+ord('a')))
    exit()

print('Impossible')
0