結果

問題 No.294 SuperFizzBuzz
ユーザー ckawatakckawatak
提出日時 2018-07-28 18:12:53
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 3,303 ms / 5,000 ms
コード長 317 bytes
コンパイル時間 361 ms
コンパイル使用メモリ 87,272 KB
実行使用メモリ 76,768 KB
最終ジャッジ日時 2023-09-20 05:35:38
合計ジャッジ時間 22,224 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,388 KB
testcase_01 AC 79 ms
75,440 KB
testcase_02 AC 3,258 ms
76,576 KB
testcase_03 AC 75 ms
71,444 KB
testcase_04 AC 76 ms
71,364 KB
testcase_05 AC 73 ms
71,244 KB
testcase_06 AC 81 ms
76,248 KB
testcase_07 AC 83 ms
76,052 KB
testcase_08 AC 257 ms
76,288 KB
testcase_09 AC 1,873 ms
76,700 KB
testcase_10 AC 1,866 ms
76,700 KB
testcase_11 AC 3,038 ms
76,768 KB
testcase_12 AC 3,176 ms
76,492 KB
testcase_13 AC 3,225 ms
76,544 KB
testcase_14 AC 3,303 ms
76,484 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

def bitcount(n):
    r = 0
    while 0 < n:
        r = r + (n & 1)
        n = n >> 1
    return r

i = 1
while 0 < N:
    i = i + 2
    if bitcount(i) % 3 == 1:
        N = N - 1

for j in reversed(range(31)):
    n = i >> j
    if 1 < n:
        print('5' if n % 2 != 0 else '3', end='')
print()
0