結果

問題 No.857 素振り
ユーザー masa_ahe
提出日時 2020-03-14 23:07:40
言語 Java
(openjdk 23)
結果
AC  
実行時間 150 ms / 1,000 ms
コード長 313 bytes
コンパイル時間 2,087 ms
コンパイル使用メモリ 74,016 KB
実行使用メモリ 41,344 KB
最終ジャッジ日時 2024-11-23 21:29:26
合計ジャッジ時間 4,233 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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();
		if(z>=y)System.out.println(z-2);
		else if(y>=z&&z>=x)System.out.println(z-1);
		else if(x>z)System.out.println(z);
	}
}
0