結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2015-08-05 03:44:14 |
| 言語 | C90 (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 184 bytes |
| 記録 | |
| コンパイル時間 | 222 ms |
| コンパイル使用メモリ | 30,024 KB |
| 最終ジャッジ日時 | 2026-02-23 18:56:52 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:4:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
4 | scanf("%d",&n);n*=3;
| ^~~~~~~~~~~~~~
main.c:5:12: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | while(n--){scanf("%d",&t);a[t-1]++;}t=0;
| ^~~~~~~~~~~~~~
ソースコード
#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;
}
testestest