結果
| 問題 | No.1742 Binary Indexed Train |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-11-14 18:02:35 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 223 bytes |
| 記録 | |
| コンパイル時間 | 784 ms |
| コンパイル使用メモリ | 20,848 KB |
| 実行使用メモリ | 15,488 KB |
| 最終ジャッジ日時 | 2026-05-23 17:30:01 |
| 合計ジャッジ時間 | 12,473 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 TLE * 3 -- * 23 |
ソースコード
n, q = map(int, input().split()) for _ in range(q): s, t = map(int, input().split()) ans = 0 s += 1 << n; t += 1 << n while s < t: if s & 1: ans += 1; s += 1 if t & 1: ans += 1; t -= 1 s >>= 1; t >>= 1 print(ans)