結果

問題 No.1748 Parking Lot
ユーザー merlinmerlin
提出日時 2021-11-19 21:48:20
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 469 bytes
コンパイル時間 2,311 ms
コンパイル使用メモリ 71,544 KB
実行使用メモリ 51,216 KB
最終ジャッジ日時 2023-08-30 08:04:44
合計ジャッジ時間 4,578 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
49,368 KB
testcase_01 AC 45 ms
49,144 KB
testcase_02 AC 44 ms
49,080 KB
testcase_03 AC 44 ms
49,364 KB
testcase_04 AC 44 ms
49,272 KB
testcase_05 AC 43 ms
49,216 KB
testcase_06 AC 44 ms
49,192 KB
testcase_07 AC 43 ms
49,380 KB
testcase_08 WA -
testcase_09 AC 43 ms
47,720 KB
testcase_10 AC 45 ms
49,244 KB
testcase_11 AC 44 ms
49,372 KB
testcase_12 AC 44 ms
49,244 KB
testcase_13 AC 44 ms
49,380 KB
testcase_14 AC 44 ms
49,316 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 44 ms
47,420 KB
testcase_21 WA -
testcase_22 AC 45 ms
49,292 KB
testcase_23 AC 44 ms
49,228 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;

class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader bu=new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb=new StringBuilder();
        String s[]=bu.readLine().split(" ");
        int n=Integer.parseInt(s[0]),k=Integer.parseInt(s[1]);
        int ans=n;
        if(n-1>k) ans=n-1;
        else if(k-1>0) ans=k-1;
        System.out.println(ans);
    }
}
0