結果

問題 No.360 増加門松列
ユーザー 37zigen37zigen
提出日時 2016-04-17 23:06:27
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 545 bytes
コンパイル時間 2,200 ms
コンパイル使用メモリ 74,844 KB
実行使用メモリ 56,504 KB
最終ジャッジ日時 2024-04-15 02:25:02
合計ジャッジ時間 6,177 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 138 ms
54,168 KB
testcase_03 AC 139 ms
56,076 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 135 ms
54,296 KB
testcase_10 AC 135 ms
54,248 KB
testcase_11 AC 137 ms
53,936 KB
testcase_12 WA -
testcase_13 AC 134 ms
54,208 KB
testcase_14 AC 136 ms
54,304 KB
testcase_15 AC 138 ms
53,964 KB
testcase_16 AC 139 ms
54,136 KB
testcase_17 AC 135 ms
54,004 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 139 ms
54,320 KB
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.Scanner;
public class Main{
	public static void main(String[] args)throws Exception{
		new Main().solve();
	}
	void solve(){
		Scanner sc=new Scanner(System.in);
		int[] d=new int[7];
		for(int i=0;i<7;i++){
			d[i]=sc.nextInt();
		}
		Arrays.sort(d);
		int count=1;
		int countM=1;
		for(int i=0;i<6;i++){
			if(d[i]==d[i+1]){
				count++;
				countM=Math.max(countM, count);
			}else{
				count=0;
			}
		}
		if(countM>=3){
			System.out.println("NO");
		}else{
			System.out.println("YES");
		}
	}
}
0