結果

問題 No.313 π
ユーザー mbanmban
提出日時 2016-11-01 05:46:09
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 95 ms / 5,000 ms
コード長 864 bytes
コンパイル時間 5,379 ms
コンパイル使用メモリ 102,988 KB
実行使用メモリ 25,240 KB
最終ジャッジ日時 2023-08-16 12:09:08
合計ジャッジ時間 8,399 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 90 ms
23,200 KB
testcase_01 AC 90 ms
23,224 KB
testcase_02 AC 90 ms
25,220 KB
testcase_03 AC 90 ms
23,168 KB
testcase_04 AC 90 ms
23,248 KB
testcase_05 AC 89 ms
23,292 KB
testcase_06 AC 91 ms
23,120 KB
testcase_07 AC 91 ms
25,240 KB
testcase_08 AC 91 ms
23,128 KB
testcase_09 AC 90 ms
23,136 KB
testcase_10 AC 90 ms
23,092 KB
testcase_11 AC 90 ms
23,076 KB
testcase_12 AC 91 ms
25,232 KB
testcase_13 AC 91 ms
25,180 KB
testcase_14 AC 91 ms
23,088 KB
testcase_15 AC 92 ms
23,188 KB
testcase_16 AC 91 ms
21,148 KB
testcase_17 AC 92 ms
23,124 KB
testcase_18 AC 92 ms
25,224 KB
testcase_19 AC 91 ms
25,236 KB
testcase_20 AC 91 ms
25,176 KB
testcase_21 AC 92 ms
23,164 KB
testcase_22 AC 92 ms
23,184 KB
testcase_23 AC 92 ms
23,332 KB
testcase_24 AC 91 ms
23,140 KB
testcase_25 AC 91 ms
23,228 KB
testcase_26 AC 90 ms
25,124 KB
testcase_27 AC 90 ms
23,116 KB
testcase_28 AC 95 ms
23,096 KB
testcase_29 AC 90 ms
23,320 KB
testcase_30 AC 90 ms
23,188 KB
testcase_31 AC 92 ms
23,292 KB
testcase_32 AC 91 ms
23,192 KB
testcase_33 AC 90 ms
21,076 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

class Magatro
{
   static int[] cnt = new int[10];
   static void Main()
    {
        string s = Console.ReadLine();
        Counter(s);
        int n=0, m=0;
        int[] ans = { 20104, 20063, 19892, 20011, 19874, 20199, 19898, 20163, 19956, 19841 };
        for(int i = 0; i < 10; i++)
        {
            if (cnt[i] < ans[i])
            {
                n = i;
            }
            if (ans[i] < cnt[i])
            {
                m = i;
            }
        }
        Console.WriteLine("{0} {1}", m, n);
    }
    static void Counter(string s)
    {
        for(int i = 0; i < 10; i++)
        {
            string q = s;
            s = s.Replace(i.ToString(), "");
            cnt[i] = q.Length - s.Length;
        }
    }
}


0