結果

問題 No.29 パワーアップ
ユーザー Suunn
提出日時 2018-11-20 05:16:05
言語 Java
(openjdk 23)
結果
RE  
実行時間 -
コード長 428 bytes
コンパイル時間 2,150 ms
コンパイル使用メモリ 74,624 KB
実行使用メモリ 41,488 KB
最終ジャッジ日時 2024-12-24 15:22:44
合計ジャッジ時間 5,769 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 4 RE * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
	

public class Main{
	
	
	public static void main(String args[])throws Exception{
		
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] item = new int[11];
		for(int i=0;i<3*N;i++){
			int I = sc.nextInt();
			item[i]++;
		}
		int ans = 0;
		int amari = 0;
		for(int i=1;i<=10;i++){
			ans += item[i]/2;
			amari += item[i]%2;
		}
		ans += amari/4;
		System.out.println(ans);
	}
}
0