結果

問題 No.338 アンケート機能
ユーザー HimatsubushinHimatsubushin
提出日時 2016-03-11 15:28:20
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 59 ms / 2,000 ms
コード長 868 bytes
コンパイル時間 2,217 ms
コンパイル使用メモリ 102,092 KB
実行使用メモリ 22,848 KB
最終ジャッジ日時 2023-08-07 21:41:06
合計ジャッジ時間 5,248 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
20,728 KB
testcase_01 AC 57 ms
18,744 KB
testcase_02 AC 57 ms
20,868 KB
testcase_03 AC 57 ms
20,772 KB
testcase_04 AC 56 ms
20,716 KB
testcase_05 AC 56 ms
18,740 KB
testcase_06 AC 57 ms
20,776 KB
testcase_07 AC 58 ms
22,760 KB
testcase_08 AC 57 ms
20,612 KB
testcase_09 AC 56 ms
20,704 KB
testcase_10 AC 58 ms
22,808 KB
testcase_11 AC 57 ms
18,732 KB
testcase_12 AC 57 ms
20,704 KB
testcase_13 AC 58 ms
20,620 KB
testcase_14 AC 58 ms
22,840 KB
testcase_15 AC 56 ms
18,728 KB
testcase_16 AC 57 ms
20,820 KB
testcase_17 AC 57 ms
20,892 KB
testcase_18 AC 57 ms
20,788 KB
testcase_19 AC 57 ms
20,676 KB
testcase_20 AC 57 ms
20,704 KB
testcase_21 AC 56 ms
20,772 KB
testcase_22 AC 58 ms
22,760 KB
testcase_23 AC 59 ms
22,672 KB
testcase_24 AC 58 ms
20,852 KB
testcase_25 AC 59 ms
22,752 KB
testcase_26 AC 57 ms
20,688 KB
testcase_27 AC 58 ms
20,696 KB
testcase_28 AC 57 ms
20,800 KB
testcase_29 AC 56 ms
20,768 KB
testcase_30 AC 56 ms
22,848 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 No338
{
    class Program
    {
        static void Main(string[] args)
        {
            int min_a = 100, min_b = 100;

            string[] data = Console.ReadLine().Split(' ');
            int A = int.Parse(data[0]);
            int B = int.Parse(data[1]);

            for (double a = 0.0; a <= 200.0; a++)
            {
                for (double b = 0.0; b <= 200.0; b++)
                {
                    if (A == (int)(a / (a + b) * 100 + 0.5) && B == (int)(b / (a + b) * 100 + 0.5))
                    {
                        if (min_a + min_b > (int)a + (int)b)
                        {
                            min_a = (int)a;
                            min_b = (int)b;
                        }
                    }
                }
            }

            Console.WriteLine(min_a + min_b);
        }
    }
}
0