結果

問題 No.294 SuperFizzBuzz
ユーザー Yukino DX.
提出日時 2023-11-09 22:19:51
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 832 ms / 5,000 ms
コード長 415 bytes
コンパイル時間 305 ms
コンパイル使用メモリ 82,000 KB
実行使用メモリ 58,752 KB
最終ジャッジ日時 2024-09-26 00:36:57
合計ジャッジ時間 6,335 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import count

n = int(input())
for dig in count(1):
    for i in range(1 << dig):
        if i & 1 != 0 and i.bit_count() % 3 == 0:
            n -= 1

        if n == 0:
            ans = ""
            for j in range(dig):
                if i & (1 << j) != 0:
                    ans = "5" + ans
                else:
                    ans = "3" + ans

            print(ans)
            exit()
0