結果

問題 No.349 干支の置き物
ユーザー Himatsubushin
提出日時 2020-12-26 13:14:06
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 689 bytes
コンパイル時間 262 ms
コンパイル使用メモリ 29,696 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-24 16:22:35
合計ジャッジ時間 1,129 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

//
//  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