結果

問題 No.35 タイパー高橋
ユーザー abL8ZLsTbFabL8ZLsTbF
提出日時 2016-04-16 20:17:14
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 29 ms / 5,000 ms
コード長 712 bytes
コンパイル時間 798 ms
コンパイル使用メモリ 109,480 KB
実行使用メモリ 24,244 KB
最終ジャッジ日時 2024-04-15 02:12:35
合計ジャッジ時間 1,194 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 24 ms
24,096 KB
testcase_01 AC 24 ms
24,244 KB
testcase_02 AC 29 ms
24,056 KB
testcase_03 AC 24 ms
23,964 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class Program {
    public static void Main() {
        const int SPEED = 12;   //高橋君の秒間タイプ数
        int n = int.Parse(Console.ReadLine());  //区間数
        int correct = 0;    //タイプできた文字数
        int miss = 0;   //逃した文字数
        for (int i = 0; i < n; i++) {
            string[] input = Console.ReadLine().Split();
            int time = int.Parse(input[0]); //制限時間
            int length = input[1].Length;   //文字列の長さ
            int typed = Math.Min(SPEED*time/1000, length);
            correct += typed;
            miss += length - typed;
        }
        Console.WriteLine("{0} {1}", correct, miss);
    }
}
0