結果

問題 No.998 Four Integers
ユーザー pacicficdolphin
提出日時 2020-03-08 12:30:10
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 432 bytes
コンパイル時間 2,144 ms
コンパイル使用メモリ 74,420 KB
実行使用メモリ 56,064 KB
最終ジャッジ日時 2024-11-07 00:09:17
合計ジャッジ時間 6,501 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 19 WA * 4
権限があれば一括ダウンロードができます

ソースコード

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