結果

問題 No.857 素振り
ユーザー tentententen
提出日時 2020-08-31 15:32:42
言語 Java21
(openjdk 21)
結果
AC  
実行時間 112 ms / 1,000 ms
コード長 393 bytes
コンパイル時間 2,262 ms
コンパイル使用メモリ 72,652 KB
実行使用メモリ 56,080 KB
最終ジャッジ日時 2023-08-10 01:50:31
合計ジャッジ時間 4,310 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 107 ms
56,080 KB
testcase_01 AC 106 ms
55,560 KB
testcase_02 AC 107 ms
55,928 KB
testcase_03 AC 104 ms
55,864 KB
testcase_04 AC 105 ms
56,016 KB
testcase_05 AC 106 ms
55,868 KB
testcase_06 AC 105 ms
55,532 KB
testcase_07 AC 106 ms
55,740 KB
testcase_08 AC 107 ms
55,976 KB
testcase_09 AC 112 ms
55,540 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	public static void main (String[] args) {
    	Scanner sc = new Scanner(System.in);
    	long x = sc.nextLong();
    	long y = sc.nextLong();
    	long z = sc.nextLong();
    	long ans;
    	if (y <= z) {
    	    ans = z - 2;
    	} else if (x <= z) {
    	    ans = z - 1;
    	} else {
    	    ans = z;
    	}
    	System.out.println(ans);
    }
}
0