結果

問題 No.857 素振り
ユーザー bambambambam
提出日時 2019-08-22 10:15:46
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 1,000 ms
コード長 356 bytes
コンパイル時間 2,019 ms
コンパイル使用メモリ 74,592 KB
実行使用メモリ 54,336 KB
最終ジャッジ日時 2024-04-20 05:56:22
合計ジャッジ時間 3,580 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
53,692 KB
testcase_01 AC 110 ms
54,144 KB
testcase_02 AC 101 ms
53,468 KB
testcase_03 AC 108 ms
53,852 KB
testcase_04 AC 101 ms
54,336 KB
testcase_05 AC 108 ms
54,032 KB
testcase_06 AC 101 ms
52,952 KB
testcase_07 AC 111 ms
54,056 KB
testcase_08 AC 110 ms
53,860 KB
testcase_09 AC 113 ms
53,924 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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