結果
問題 | No.29 パワーアップ |
ユーザー |
|
提出日時 | 2016-11-30 22:13:24 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 266 bytes |
コンパイル時間 | 82 ms |
コンパイル使用メモリ | 21,120 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-27 14:05:28 |
合計ジャッジ時間 | 835 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%d",&n); | ^~~~~~~~~~~~~~ main.c:7:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%d%d%d",&a,&b,&c); | ^~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h> int main(void){ int n,a,b,c,d[16]={0},i,r = 0,m = 0; scanf("%d",&n); for(i = 1;i <= n;i++){ scanf("%d%d%d",&a,&b,&c); d[a]++;d[b]++;d[c]++; } for(i = 1;i <= 10;i++){ r+=(d[i]/2);m+=(d[i]%2); } r+=(m/4); printf("%d\n",r); return 0; }