結果
問題 | No.29 パワーアップ |
ユーザー |
👑 ![]() |
提出日時 | 2015-08-05 03:44:14 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 184 bytes |
コンパイル時間 | 103 ms |
コンパイル使用メモリ | 20,992 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-18 01:22:27 |
合計ジャッジ時間 | 821 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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; }