結果
問題 | No.1643 Not Substring |
ユーザー |
![]() |
提出日時 | 2021-08-13 21:51:58 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 39 ms / 2,000 ms |
コード長 | 686 bytes |
コンパイル時間 | 383 ms |
コンパイル使用メモリ | 82,400 KB |
実行使用メモリ | 53,760 KB |
最終ジャッジ日時 | 2024-10-03 21:46:56 |
合計ジャッジ時間 | 2,339 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 26 |
ソースコード
'''Python3(PyPy3) Template for Programming-Contest.author : sgswgenerated : 2021/08/13when : 21:45:24'''import sysdef input():return sys.stdin.readline().rstrip()DXY = [(0, -1), (1, 0), (0, 1), (-1, 0)] # LDRUmod = 998244353inf = 1 << 64def 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 0if __name__ == "__main__":main()