結果
問題 | No.2393 Bit Grid Connected Component |
ユーザー |
|
提出日時 | 2023-07-28 22:18:10 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 549 ms / 2,000 ms |
コード長 | 430 bytes |
コンパイル時間 | 496 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 90,240 KB |
最終ジャッジ日時 | 2024-10-06 19:22:58 |
合計ジャッジ時間 | 6,237 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 20 |
ソースコード
import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random #sys.setrecursionlimit(10**9) t = int(input()) for i in range(t): x,y = map(int,input().split()) for j in range(60): if j < y and ((x >> j) & 1) == 0: x += 2**j temp = 0 for j in range(60): if ((x >> j) & 1) == 1: temp += 2**j else: break print(temp)