結果
| 問題 |
No.35 タイパー高橋
|
| コンテスト | |
| ユーザー |
fujita
|
| 提出日時 | 2023-05-09 13:09:15 |
| 言語 | C# (.NET 8.0.404) |
| 結果 |
AC
|
| 実行時間 | 48 ms / 5,000 ms |
| コード長 | 1,102 bytes |
| コンパイル時間 | 15,494 ms |
| コンパイル使用メモリ | 166,772 KB |
| 実行使用メモリ | 183,408 KB |
| 最終ジャッジ日時 | 2024-11-26 00:20:41 |
| 合計ジャッジ時間 | 10,040 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (89 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
using System;
namespace yukicoder
{
class Program
{
static void Main(string[] args)
{
int N = int.Parse(Console.ReadLine());
int type = 0, losstype = 0, num = 0;
string[] strings = new string[N];
double n = (double)12 / 1000;
for (int i = 0; i < N; i++)
{
var str = Console.ReadLine();
var g = str.Split(" ");
strings[0] = g[0];//入力された文字を配列に
strings[1] = g[1];
num = int.Parse(strings[0]);
if (strings[1].Length < (double)(num * n))
{
type += strings[1].Length;
}
else
{
int temp = (int)Math.Floor((double)num * n);//ミスタイプ用一時受け取り
type += (int)Math.Floor((double)num * n);
losstype += strings[1].Length - temp;
}
}
Console.WriteLine(type + " " + losstype);
}
}
}
fujita