結果

問題 No.35 タイパー高橋
ユーザー mosmos_21mosmos_21
提出日時 2016-10-04 23:06:05
言語 C90
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 450 bytes
コンパイル時間 204 ms
コンパイル使用メモリ 24,016 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-13 22:57:36
合計ジャッジ時間 742 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int count(char *str){
  int i = 0;
  while(str[i++] != '\0');
  return --i;
}
int main(){
  int N, time;
  int suc = 0, fai = 0;
  int i;
  char str[101];
  scanf("%d", &N);

  for(i = 0; i < N; i++){
    scanf("%d %s", &time, str);
    suc += (12*time/1000) > count(str) ? count(str) : (12 * time/1000);
    fai += (12*time/1000) > count(str) ? 0 : count(str) - (12 * time/1000);
  }
  printf("%d %d\n", suc, fai);
  return 0;
}
0