結果
問題 | No.2246 1333-like Number |
ユーザー |
![]() |
提出日時 | 2023-05-01 09:06:39 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 44 ms / 2,000 ms |
コード長 | 574 bytes |
コンパイル時間 | 262 ms |
コンパイル使用メモリ | 82,516 KB |
実行使用メモリ | 52,224 KB |
最終ジャッジ日時 | 2024-11-20 09:25:58 |
合計ジャッジ時間 | 2,468 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
# 12222, 133333, 255555などになるはず # たとえば2桁なら12, 13, 14, 15, ---, 78, 79, 89まで # 3桁でも同じ個数しかない122, 133, 144, ---, 788, 799, 899 # ということはまず2桁のリストを作ればいい two_digit = [] for a in range(1, 10): for b in range(a+1, 10): num = a*10+b two_digit.append(num) #print(two_digit) count = len(two_digit) #print(count) N = int(input()) N -= 1 rnd = N//count remainder = N-count*rnd base = two_digit[remainder] #print(base) ans = str(base) + str(base)[-1]*(rnd) print(ans)