結果

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

ソースコード

diff #

import sys

def main():
    input = sys.stdin.read().split()
    T = int(input[0])
    Ns = list(map(int, input[1:T+1]))
    
    max_n = 10**5
    max_power = [0] * (max_n + 1)
    
    for i in range(1, max_n + 1):
        count = 0
        num = i
        while num % 2 == 0:
            num = num // 2
            count += 1
        max_power[i] = count
    
    for n in Ns:
        print(max_power[n])

if __name__ == "__main__":
    main()
0