結果

問題 No.349 干支の置き物
コンテスト
ユーザー Himatsubushin
提出日時 2020-12-26 13:14:06
言語 C(gnu17)
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -std=gnu17 -Wno-error=implicit-function-declaration -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
WA  
実行時間 -
コード長 689 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 211 ms
コンパイル使用メモリ 38,212 KB
最終ジャッジ日時 2026-02-22 06:37:07
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 29
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

//
//  a.c
//  test
//
//  Created by 小出成穂 on 2020/10/27.
//  Copyright © 2020 小出成穂. All rights reserved.
//

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(void)
{
  int count[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
  char *string[] = {"ne", "ushi", "tora", "u", "tatsu", "mi", "uma", "hitsuji", "saru", "tori", "inu", "i"};
  int i, j, n, max = 0;
  char data[10];

  scanf("%d", &n);
  
  for (i = 0; i < n; i++)
  {
    scanf("%s", data);
    for (j = 0; j < 12; j++)
      if (strcmp(string[j], data) == 0)
      {
        count[j]++;
      }
  }
  
  for (j = 0; j < 12; j++)
  {
    printf("%d\n", count[j]);
  }
  
  return EXIT_SUCCESS;
}
0