結果

問題 No.35 タイパー高橋
ユーザー TDTD
提出日時 2022-05-31 16:33:27
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 30 ms / 5,000 ms
コード長 948 bytes
コンパイル時間 1,650 ms
コンパイル使用メモリ 109,740 KB
実行使用メモリ 25,192 KB
最終ジャッジ日時 2023-10-21 00:40:56
合計ジャッジ時間 1,572 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

using System;

namespace yukicoder
{
    class Program
    {
        static void Main(string[] args)
        {
            int a = int.Parse(Console.ReadLine());
            double b= 12;
            b /= 1000;
            double c = 0;
            double[] d = new double[a];
            double[] e = new double[a];
            double ans = 0;
            double ans1 = 0;
            for (int i = 0; i < a; i++)
            {
             string[] s = Console.ReadLine().Split(' ');
                c = double.Parse(s[0]);
                c = Math.Floor(c * b);
                if (c >s[1].Length)
                {
                    c = s[1].Length;
                }
                d[i] = c;
                e[i]=s[1].Length - c;

            }
            for(int j = 0; j < a; j++)
            {
                ans += d[j];
                ans1 += e[j];
            }
            Console.WriteLine("{0} {1}", ans, ans1);
        }
    }
}
0