結果

問題 No.294 SuperFizzBuzz
ユーザー Yukino DX.Yukino DX.
提出日時 2023-11-09 22:19:51
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 873 ms / 5,000 ms
コード長 415 bytes
コンパイル時間 293 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 59,908 KB
最終ジャッジ日時 2023-11-09 22:19:59
合計ジャッジ時間 7,140 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,460 KB
testcase_01 AC 38 ms
53,460 KB
testcase_02 AC 867 ms
59,908 KB
testcase_03 AC 40 ms
53,460 KB
testcase_04 AC 40 ms
53,460 KB
testcase_05 AC 39 ms
53,460 KB
testcase_06 AC 44 ms
59,908 KB
testcase_07 AC 44 ms
59,908 KB
testcase_08 AC 84 ms
59,908 KB
testcase_09 AC 497 ms
59,908 KB
testcase_10 AC 495 ms
59,908 KB
testcase_11 AC 801 ms
59,908 KB
testcase_12 AC 825 ms
59,908 KB
testcase_13 AC 873 ms
59,908 KB
testcase_14 AC 871 ms
59,908 KB
権限があれば一括ダウンロードができます

ソースコード

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