結果

問題 No.1185 完全な3の倍数
ユーザー NatsubiSogan
提出日時 2020-09-20 12:05:19
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 1,309 ms / 2,000 ms
コード長 216 bytes
コンパイル時間 136 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-06-24 10:41:34
合計ジャッジ時間 56,231 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 39
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
ans = max(0, min(n, 100) // 3 - 9 // 3)
for i in range(1 << 18):
    s = ""
    for j in range(9):
        s += str((i % 4) * 3)
        i //= 4
    if 100 <= int(s) <= n:
        ans += 1
print(ans)
0