結果

問題 No.3079 Unite Japanese Prefectures
ユーザー gew1fw
提出日時 2025-06-12 13:56:00
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 393 bytes
コンパイル時間 183 ms
コンパイル使用メモリ 82,660 KB
実行使用メモリ 76,608 KB
最終ジャッジ日時 2025-06-12 13:56:53
合計ジャッジ時間 2,751 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

def count_trailing_zeros(m):
    if m == 0:
        return 0
    count = 0
    while (m & 1) == 0:
        count += 1
        m >>= 1
    return count

max_m = 10**5
tz = [0] * (max_m + 1)
for m in range(max_m + 1):
    tz[m] = count_trailing_zeros(m)

import sys
input = sys.stdin.read().split()
T = int(input[0])
for i in range(1, T + 1):
    N = int(input[i])
    m = N - 1
    print(tz[m])
0