結果

問題 No.632 穴埋め門松列
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-02-09 02:01:27
言語 Java21
(openjdk 21)
結果
AC  
実行時間 119 ms / 1,000 ms
コード長 531 bytes
コンパイル時間 2,155 ms
コンパイル使用メモリ 75,112 KB
実行使用メモリ 54,260 KB
最終ジャッジ日時 2024-04-09 20:52:33
合計ジャッジ時間 3,218 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
53,892 KB
testcase_01 AC 116 ms
54,056 KB
testcase_02 AC 116 ms
54,072 KB
testcase_03 AC 101 ms
52,696 KB
testcase_04 AC 119 ms
54,104 KB
testcase_05 AC 118 ms
54,260 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		int[] a = new int[3];
		int[] b = new int[3];
		for (int i=0; i<3; i++) {
			String s = sc.next();
			if (s.equals("?")) {
				a[i] = 1;
				b[i] = 4;
			}
			else {
				a[i] = Integer.parseInt(s);
				b[i] = Integer.parseInt(s);
			}
		}
		if (a[0]>a[1] && a[1]<a[2] || a[0]<a[1] && a[1]>a[2]) {System.out.print(1);}
		if (b[0]>b[1] && b[1]<b[2] || b[0]<b[1] && b[1]>b[2]) {System.out.print(4);}
	}
}
0