結果

問題 No.857 素振り
ユーザー tenten
提出日時 2020-08-31 15:32:42
言語 Java
(openjdk 23)
結果
AC  
実行時間 139 ms / 1,000 ms
コード長 393 bytes
コンパイル時間 3,198 ms
コンパイル使用メモリ 74,608 KB
実行使用メモリ 56,032 KB
最終ジャッジ日時 2024-11-16 00:35:06
合計ジャッジ時間 5,297 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 8
権限があれば一括ダウンロードができます

ソースコード

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