結果

問題 No.35 タイパー高橋
ユーザー fujitafujita
提出日時 2023-05-09 13:09:15
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 50 ms / 5,000 ms
コード長 1,102 bytes
コンパイル時間 10,301 ms
コンパイル使用メモリ 146,092 KB
実行使用メモリ 166,320 KB
最終ジャッジ日時 2023-08-17 06:09:41
合計ジャッジ時間 9,314 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
28,548 KB
testcase_01 AC 50 ms
28,328 KB
testcase_02 AC 50 ms
28,508 KB
testcase_03 AC 50 ms
166,320 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  Determining projects to restore...
  Restored /home/judge/data/code/main.csproj (in 131 ms).
.NET 向け Microsoft (R) Build Engine バージョン 17.0.0-preview-21470-01+cb055d28f
Copyright (C) Microsoft Corporation.All rights reserved.

  プレビュー版の .NET を使用しています。https://aka.ms/dotnet-core-preview をご覧ください
  main -> /home/judge/data/code/bin/Release/net6.0/main.dll
  main -> /home/judge/data/code/bin/Release/net6.0/publish/

ソースコード

diff #

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);
        }
    }
}
0