結果
| 問題 |
No.29 パワーアップ
|
| ユーザー |
ogura(tes)
|
| 提出日時 | 2014-11-25 18:15:57 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 569 bytes |
| コンパイル時間 | 3,810 ms |
| コンパイル使用メモリ | 80,680 KB |
| 実行使用メモリ | 46,888 KB |
| 最終ジャッジ日時 | 2025-10-24 20:50:53 |
| 合計ジャッジ時間 | 7,058 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 WA * 3 RE * 13 |
ソースコード
import java.util.Arrays;
import java.util.Scanner;
public class tast008 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// 整数の入力
int N = sc.nextInt();
int sum =0;
int item[] = new int[10];
Arrays.fill(item, 0);
for(int i=0;i<N;i++){
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
item[a-1]++;
item[b-1]++;
item[c-1]++;
}
for(int i=0;i<N;i++){
sum += (item[i])/2;
}
sum += ((N*3)-(sum*2))/4;
System.out.println(sum);
}
}
ogura(tes)