結果

問題 No.1643 Not Substring
ユーザー sgswsgsw
提出日時 2021-08-13 21:51:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 37 ms / 2,000 ms
コード長 686 bytes
コンパイル時間 269 ms
コンパイル使用メモリ 81,960 KB
実行使用メモリ 54,056 KB
最終ジャッジ日時 2024-04-14 19:43:23
合計ジャッジ時間 2,260 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
51,956 KB
testcase_01 AC 35 ms
53,572 KB
testcase_02 AC 36 ms
52,612 KB
testcase_03 AC 37 ms
53,616 KB
testcase_04 AC 37 ms
53,316 KB
testcase_05 AC 36 ms
53,204 KB
testcase_06 AC 36 ms
52,368 KB
testcase_07 AC 36 ms
51,880 KB
testcase_08 AC 37 ms
52,896 KB
testcase_09 AC 36 ms
52,488 KB
testcase_10 AC 36 ms
52,532 KB
testcase_11 AC 36 ms
53,436 KB
testcase_12 AC 37 ms
52,472 KB
testcase_13 AC 36 ms
53,364 KB
testcase_14 AC 36 ms
53,076 KB
testcase_15 AC 36 ms
52,656 KB
testcase_16 AC 36 ms
52,608 KB
testcase_17 AC 36 ms
52,896 KB
testcase_18 AC 36 ms
52,204 KB
testcase_19 AC 36 ms
54,056 KB
testcase_20 AC 36 ms
52,680 KB
testcase_21 AC 36 ms
52,084 KB
testcase_22 AC 36 ms
52,620 KB
testcase_23 AC 36 ms
54,024 KB
testcase_24 AC 36 ms
52,248 KB
testcase_25 AC 36 ms
52,204 KB
testcase_26 AC 36 ms
53,448 KB
testcase_27 AC 36 ms
52,472 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

'''
    Python3(PyPy3) Template for Programming-Contest.

    author : sgsw

    generated : 2021/08/13   
    when : 21:45:24

'''

import sys


def input():
    return sys.stdin.readline().rstrip()


DXY = [(0, -1), (1, 0), (0, 1), (-1, 0)]  # LDRU
mod = 998244353
inf = 1 << 64


def main():
    s = list(input())
    s = list(map(lambda x: ord(x),s))
    ans = ["zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"]
    for i in range(26):
        if i + ord("a") not in s:
            ans.append(chr(ord("a") + i))
    m = min(s)
    b = s.count(m)
    c = chr(m)
    ans.append(c * (b + 1))
    ans.sort()
    print(ans[0])
    return 0


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