結果

問題 No.998 Four Integers
ユーザー pacicficdolphinpacicficdolphin
提出日時 2020-03-08 12:30:10
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 432 bytes
コンパイル時間 1,823 ms
コンパイル使用メモリ 74,704 KB
実行使用メモリ 41,556 KB
最終ジャッジ日時 2024-04-24 15:34:59
合計ジャッジ時間 5,427 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 107 ms
40,200 KB
testcase_01 AC 116 ms
41,132 KB
testcase_02 AC 117 ms
40,928 KB
testcase_03 AC 111 ms
41,112 KB
testcase_04 AC 103 ms
40,012 KB
testcase_05 AC 112 ms
41,168 KB
testcase_06 AC 112 ms
40,268 KB
testcase_07 AC 112 ms
40,988 KB
testcase_08 AC 111 ms
40,228 KB
testcase_09 AC 113 ms
40,964 KB
testcase_10 AC 110 ms
40,956 KB
testcase_11 AC 117 ms
41,556 KB
testcase_12 AC 114 ms
40,936 KB
testcase_13 AC 101 ms
40,248 KB
testcase_14 AC 110 ms
41,112 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 113 ms
41,384 KB
testcase_18 AC 113 ms
41,012 KB
testcase_19 AC 98 ms
40,172 KB
testcase_20 WA -
testcase_21 AC 101 ms
40,432 KB
testcase_22 AC 106 ms
41,412 KB
testcase_23 AC 100 ms
39,840 KB
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
	
		int [] Y = new int[3]; 

		Scanner scanner= new Scanner(System.in);
		
	
		for(int i=0;i<Y.length;i++) {
			Y[i]=scanner.nextInt();
		}
			
	
		 Arrays.sort(Y);
		
	
		for(int i=0 ; i<Y.length-1 ; i++ ) {
			if(Y[i+1]-Y[i] !=1) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	}
}
0