結果

問題 No.2142 Segment Zero
ユーザー MasKoaTSMasKoaTS
提出日時 2022-12-02 22:10:07
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 232 bytes
コンパイル時間 243 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 74,496 KB
最終ジャッジ日時 2024-04-18 06:17:47
合計ジャッジ時間 3,545 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
51,712 KB
testcase_01 AC 53 ms
73,608 KB
testcase_02 AC 36 ms
51,968 KB
testcase_03 AC 50 ms
73,472 KB
testcase_04 AC 53 ms
74,240 KB
testcase_05 AC 51 ms
74,112 KB
testcase_06 AC 37 ms
51,968 KB
testcase_07 WA -
testcase_08 AC 51 ms
74,240 KB
testcase_09 WA -
testcase_10 AC 51 ms
74,200 KB
testcase_11 AC 52 ms
73,856 KB
testcase_12 AC 52 ms
74,240 KB
testcase_13 AC 53 ms
74,496 KB
testcase_14 AC 53 ms
73,984 KB
testcase_15 AC 52 ms
74,240 KB
testcase_16 AC 54 ms
73,856 KB
testcase_17 AC 51 ms
71,296 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 47 ms
66,432 KB
testcase_21 WA -
testcase_22 AC 48 ms
69,632 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 48 ms
65,408 KB
testcase_29 AC 47 ms
66,816 KB
testcase_30 AC 48 ms
69,376 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 52 ms
73,740 KB
testcase_36 AC 44 ms
62,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

n, m = map(int, input().split())

flag = True
lis = [*range(1, n + 1)][::-1]
ans = 0
for k in lis:
	if(m >= k):
		m -= k
		flag = True
		continue
	if(flag):
		ans += 1
	flag = False
print(ans)
0