結果

問題 No.548 国士無双
ユーザー mlihua09mlihua09
提出日時 2020-08-29 16:38:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 48 ms / 2,000 ms
コード長 545 bytes
コンパイル時間 176 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 53,760 KB
最終ジャッジ日時 2024-04-26 22:30:27
合計ジャッジ時間 2,329 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #


from collections import defaultdict

d = defaultdict(int)

try:
    
    S = input()
    
except:
    
    print('Impossible')
    exit()
    
if len(S) != 13:
    
    print('Impossible')
    exit()
    
for s in S:
    
    d[s] += 1
    
x = list(d.values())

if x.count(1) == 13:
    
    print('a', 'b', 'c', 'd','e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', sep='\n')
    
elif x.count(1) == 11:
    
    for k in 'abcdefghijklm':
        if not (k in S):
            print(k)
            break
        
else:
    
    print('Impossible')
0