結果

問題 No.548 国士無双
ユーザー apahie
提出日時 2019-04-07 16:33:15
言語 Nim
(2.2.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 304 bytes
コンパイル時間 3,066 ms
コンパイル使用メモリ 62,192 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-01 22:45:48
合計ジャッジ時間 3,909 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

import tables

let s = stdin.readLine
var d = initCountTable[char]()
for c in s:
    d.inc c

if d.len == 13:
    for c in 'a'..'m':
        echo c
elif d.len == 12 and d.largest.val == 2:
    for c in 'a'..'m':
        if not d.haskey(c):
            echo c
            break
else:
    echo "Impossible"
0