結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-11-23 19:58:29 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 443 bytes |
| 記録 | |
| コンパイル時間 | 180 ms |
| コンパイル使用メモリ | 37,344 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-10-24 20:55:07 |
| 合計ジャッジ時間 | 980 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
#include <stdio.h>
int main(){
int item[10]={0};
int n, input;
int i, j, rest=0;
int powup_cnt=0;
scanf("%d", &n);
for(i=0; i<n; ++i){
for(j=0; j<3; ++j){
scanf("%d", &input);
++item[input%10];
}
}
for(i=0; i<10; ++i){
while(item[i]>=2){
item[i]-=2;
++powup_cnt;
}
rest+=item[i];
}
while(rest>=4){
rest-=4;
++powup_cnt;
}
printf("%d\n", powup_cnt);
return 0;
}