結果
問題 |
No.2142 Segment Zero
|
ユーザー |
|
提出日時 | 2022-12-03 10:12:50 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 56 ms / 2,000 ms |
コード長 | 236 bytes |
コンパイル時間 | 290 ms |
コンパイル使用メモリ | 82,112 KB |
実行使用メモリ | 61,372 KB |
最終ジャッジ日時 | 2024-10-10 11:35:32 |
合計ジャッジ時間 | 3,432 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 35 |
ソースコード
n,k = map(int,input().split()) now = 1 count = 0 k = n*(n+1)//2-k for i in range(1,n+1): while now <= n and count < k: count += now now += 1 if count == k: print(1) exit() count -= i print(2)