結果

問題 No.2607 Add One Digit
コンテスト
ユーザー norioc
提出日時 2026-07-27 02:38:32
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 64 ms / 1,000 ms
+ 803µs
コード長 279 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3,553 ms
コンパイル使用メモリ 96,100 KB
実行使用メモリ 78,976 KB
最終ジャッジ日時 2026-07-27 02:38:53
合計ジャッジ時間 3,527 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N = int(input())

cs = [c for c in str(N)]

used = set()
for i in range(len(cs)+1):
    for d in range(10):
        xs = cs.copy()
        xs.insert(i, str(d))

        x = int(''.join(xs))
        if len(str(x)) == len(cs)+1:
            used.add(x)

ans = len(used)
print(ans)
0