結果

問題 No.822 Bitwise AND
ユーザー 6soukiti296soukiti29
提出日時 2019-04-26 23:06:32
言語 Nim
(2.0.2)
結果
WA  
実行時間 -
コード長 260 bytes
コンパイル時間 2,920 ms
コンパイル使用メモリ 67,840 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-14 16:10:16
合計ジャッジ時間 4,530 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 92 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 WA -
testcase_04 AC 139 ms
4,376 KB
testcase_05 AC 55 ms
4,376 KB
testcase_06 AC 97 ms
4,376 KB
testcase_07 AC 139 ms
4,376 KB
testcase_08 AC 3 ms
4,376 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 3 ms
4,380 KB
testcase_13 AC 1 ms
4,376 KB
testcase_14 WA -
testcase_15 AC 75 ms
4,376 KB
testcase_16 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sequtils,strutils
var
    N, K, ans, n : int64
(N, K) = stdin.readline.split.map(parseBiggestInt)
for i in 0 .. (N * 2):
    for j in 0 .. min(i,K):
        var
            x = i - j
        if (i and x) == N and i >= x:
            ans += 1

echo ans

0