結果
| 問題 |
No.822 Bitwise AND
|
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2025-10-29 21:07:40 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 337 bytes |
| コンパイル時間 | 320 ms |
| コンパイル使用メモリ | 82,340 KB |
| 実行使用メモリ | 65,876 KB |
| 最終ジャッジ日時 | 2025-10-29 21:07:49 |
| 合計ジャッジ時間 | 8,521 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 WA * 5 TLE * 1 |
ソースコード
N,K = map(int,input().split())
if N == 0:
if K == 0:
print(0)
else:
print("INF")
exit()
Q = []
for i in range(N,100000):
if N & i == N:
Q.append(i)
ans = 0
for q1 in Q:
for q2 in Q:
if q1 < q2:
break
if q1 & q2 == N and q1 - q2 <= K:
ans += 1
print(ans)
ntuda