結果

問題 No.857 素振り
ユーザー GrenacheGrenache
提出日時 2019-08-09 21:47:17
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 1,000 ms
コード長 1,330 bytes
コンパイル時間 6,704 ms
コンパイル使用メモリ 74,396 KB
実行使用メモリ 56,088 KB
最終ジャッジ日時 2023-09-26 17:38:36
合計ジャッジ時間 7,379 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
55,868 KB
testcase_01 AC 128 ms
55,896 KB
testcase_02 AC 131 ms
55,816 KB
testcase_03 AC 129 ms
55,892 KB
testcase_04 AC 127 ms
56,020 KB
testcase_05 AC 129 ms
55,732 KB
testcase_06 AC 127 ms
56,088 KB
testcase_07 AC 126 ms
55,872 KB
testcase_08 AC 128 ms
55,836 KB
testcase_09 AC 127 ms
55,844 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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


public class Main_yukicoder857 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		long x = sc.nextLong();
		long y = sc.nextLong();
		long z = sc.nextLong();

		long ans = z;
		if (x <= z) {
			ans--;
		}
		if (y <= z) {
			ans--;
		}
		
		pr.println(ans);
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);
			
		solve();
			
		pr.close();
		sc.close();
	}

	static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
		
		void printInts(int... a) {
			StringBuilder sb = new StringBuilder(32);
			for (int i = 0, size = a.length; i < size; i++) {
				if (i > 0) {
					sb.append(' ');
				}
				sb.append(a[i]);
			}

			println(sb);
		}
		
		void printLongs(long... a) {
			StringBuilder sb = new StringBuilder(64);
			for (int i = 0, size = a.length; i < size; i++) {
				if (i > 0) {
					sb.append(' ');
				}
				sb.append(a[i]);
			}

			println(sb);
		}
		
		void printStrings(String... a) {
			StringBuilder sb = new StringBuilder(32);
			for (int i = 0, size = a.length; i < size; i++) {
				if (i > 0) {
					sb.append(' ');
				}
				sb.append(a[i]);
			}

			println(sb);
		}
	}
}
0