結果

問題 No.29 パワーアップ
ユーザー 👑 testestesttestestest
提出日時 2015-08-05 03:44:14
言語 C90
(gcc 8.5.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 184 bytes
コンパイル時間 84 ms
使用メモリ 9,784 KB
最終ジャッジ日時 2023-02-15 16:29:46
合計ジャッジ時間 1,180 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 1 ms
7,592 KB
testcase_01 AC 1 ms
7,684 KB
testcase_02 AC 1 ms
7,684 KB
testcase_03 AC 1 ms
7,652 KB
testcase_04 AC 1 ms
9,680 KB
testcase_05 AC 1 ms
9,784 KB
testcase_06 AC 1 ms
7,724 KB
testcase_07 AC 0 ms
7,608 KB
testcase_08 AC 1 ms
9,708 KB
testcase_09 AC 1 ms
9,784 KB
testcase_10 AC 1 ms
7,572 KB
testcase_11 AC 1 ms
7,652 KB
testcase_12 AC 1 ms
9,696 KB
testcase_13 AC 0 ms
7,612 KB
testcase_14 AC 1 ms
7,576 KB
testcase_15 AC 0 ms
7,568 KB
testcase_16 AC 0 ms
7,676 KB
testcase_17 AC 0 ms
9,680 KB
testcase_18 AC 1 ms
7,668 KB
testcase_19 AC 0 ms
7,656 KB
testcase_20 AC 1 ms
9,700 KB
testcase_21 AC 1 ms
7,588 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
int main(){
int n,a[10]={},t,i=10,s=0;
scanf("%d",&n);n*=3;
while(n--){scanf("%d",&t);a[t-1]++;}t=0;
while(i--){s+=a[i]/2;t+=a[i]&1;}
printf("%d",s+t/4);
return 0;
}
0