結果
問題 | No.2607 Add One Digit |
ユーザー |
|
提出日時 | 2024-01-05 18:00:19 |
言語 | Nim (2.2.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 296 bytes |
コンパイル時間 | 5,715 ms |
コンパイル使用メモリ | 66,348 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-27 19:23:59 |
合計ジャッジ時間 | 5,653 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 |
ソースコード
import strutils, setslet n = stdin.readLine.stripvar resultSet = initHashSet[string]()for pos in 0..len(n):for d in 0..9:if pos == 0 and d == 0:continuelet newN = n[0..<pos] & d.intToStr & n[pos..<len(n)]resultSet.incl(newN)echo resultSet.len