結果

問題 No.1052 電子機器X
ユーザー lam6er
提出日時 2025-03-20 20:32:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 38 ms / 1,000 ms
コード長 194 bytes
コンパイル時間 173 ms
コンパイル使用メモリ 82,748 KB
実行使用メモリ 53,608 KB
最終ジャッジ日時 2025-03-20 20:33:04
合計ジャッジ時間 1,666 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, input().split())

if N == 1:
    print(1)
else:
    if N % 2 == 0:
        max_count = N // 2
    else:
        max_count = N
    answer = min(K + 1, max_count)
    print(answer)
0