結果

問題 No.821 Making Integers
ユーザー kohei2019kohei2019
提出日時 2022-04-19 23:22:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 71 ms / 2,000 ms
コード長 107 bytes
コンパイル時間 1,163 ms
コンパイル使用メモリ 86,672 KB
実行使用メモリ 71,416 KB
最終ジャッジ日時 2023-08-30 21:24:32
合計ジャッジ時間 2,495 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,260 KB
testcase_01 AC 69 ms
71,136 KB
testcase_02 AC 68 ms
71,176 KB
testcase_03 AC 69 ms
71,200 KB
testcase_04 AC 70 ms
71,176 KB
testcase_05 AC 69 ms
71,232 KB
testcase_06 AC 71 ms
71,412 KB
testcase_07 AC 71 ms
71,416 KB
testcase_08 AC 71 ms
71,268 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K = map(int,input().split())
maxn = N*(N+1)//2
c = N-K
minn = -(maxn-c*(c+1))
d = maxn-minn
print(d//2+1)
0