結果

問題 No.1673 Lamps on a line
ユーザー Mik10Mik10
提出日時 2021-10-08 15:19:46
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 194 bytes
コンパイル時間 281 ms
コンパイル使用メモリ 86,540 KB
実行使用メモリ 264,876 KB
最終ジャッジ日時 2023-09-30 09:18:08
合計ジャッジ時間 5,619 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
76,088 KB
testcase_01 AC 76 ms
70,668 KB
testcase_02 AC 257 ms
77,816 KB
testcase_03 AC 244 ms
78,132 KB
testcase_04 AC 342 ms
78,136 KB
testcase_05 AC 131 ms
77,984 KB
testcase_06 AC 310 ms
78,032 KB
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n, q = list(map(int, input().split()))
xex = 0
for i in range(q):
    l, r = list(map(int, input().split()))
    x = (pow(2, (r)) - pow(2, (l-1)))
    print(bin(x:=x^xex).count("1"))
    xex = x
0