結果
| 問題 |
No.1849 Three Times Value
|
| ユーザー |
AEn
|
| 提出日時 | 2022-05-11 23:55:56 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 72 ms / 2,000 ms |
| コード長 | 335 bytes |
| コンパイル時間 | 256 ms |
| コンパイル使用メモリ | 81,920 KB |
| 実行使用メモリ | 76,160 KB |
| 最終ジャッジ日時 | 2024-07-19 09:55:57 |
| 合計ジャッジ時間 | 2,575 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
from itertools import product
N = int(input())
cnt = 0
num = [str(i) for i in range(10)]
for i in range(3, 16, 3):
if len(str(N)) < i:
break
for v in product(num, repeat = i//3):
if v[0] == '0':
continue
s = ''.join(v)
s = 3 * s
if int(s)<=N:
cnt += 1
print(cnt)
AEn