結果
| 問題 |
No.35 タイパー高橋
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-04-16 20:17:14 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 26 ms / 5,000 ms |
| コード長 | 712 bytes |
| コンパイル時間 | 910 ms |
| コンパイル使用メモリ | 108,012 KB |
| 実行使用メモリ | 25,968 KB |
| 最終ジャッジ日時 | 2024-10-04 10:19:04 |
| 合計ジャッジ時間 | 1,440 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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);
}
}