結果

問題 No.129 お年玉(2)
ユーザー AreTrashAreTrash
提出日時 2016-05-26 11:17:12
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 349 ms / 5,000 ms
コード長 583 bytes
コンパイル時間 2,787 ms
コンパイル使用メモリ 101,788 KB
実行使用メモリ 48,540 KB
最終ジャッジ日時 2023-08-18 17:41:21
合計ジャッジ時間 10,773 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
27,136 KB
testcase_01 AC 349 ms
44,788 KB
testcase_02 AC 55 ms
20,980 KB
testcase_03 AC 55 ms
20,836 KB
testcase_04 AC 53 ms
20,964 KB
testcase_05 AC 121 ms
38,500 KB
testcase_06 AC 178 ms
45,864 KB
testcase_07 AC 214 ms
44,040 KB
testcase_08 AC 166 ms
45,948 KB
testcase_09 AC 199 ms
45,912 KB
testcase_10 AC 233 ms
48,008 KB
testcase_11 AC 151 ms
47,940 KB
testcase_12 AC 221 ms
46,736 KB
testcase_13 AC 235 ms
47,928 KB
testcase_14 AC 188 ms
45,848 KB
testcase_15 AC 164 ms
47,960 KB
testcase_16 AC 186 ms
44,048 KB
testcase_17 AC 216 ms
45,920 KB
testcase_18 AC 199 ms
47,956 KB
testcase_19 AC 239 ms
47,280 KB
testcase_20 AC 214 ms
45,956 KB
testcase_21 AC 277 ms
46,120 KB
testcase_22 AC 159 ms
45,972 KB
testcase_23 AC 236 ms
47,884 KB
testcase_24 AC 260 ms
46,548 KB
testcase_25 AC 148 ms
45,996 KB
testcase_26 AC 153 ms
48,048 KB
testcase_27 AC 151 ms
47,940 KB
testcase_28 AC 265 ms
48,020 KB
testcase_29 AC 53 ms
20,952 KB
testcase_30 AC 53 ms
20,896 KB
testcase_31 AC 57 ms
22,920 KB
testcase_32 AC 58 ms
22,900 KB
testcase_33 AC 58 ms
20,992 KB
testcase_34 AC 58 ms
22,840 KB
testcase_35 AC 56 ms
20,868 KB
testcase_36 AC 56 ms
22,856 KB
testcase_37 AC 56 ms
18,956 KB
testcase_38 AC 76 ms
25,072 KB
testcase_39 AC 82 ms
25,068 KB
testcase_40 AC 142 ms
45,852 KB
testcase_41 AC 95 ms
27,124 KB
testcase_42 AC 76 ms
25,088 KB
testcase_43 AC 78 ms
27,016 KB
testcase_44 AC 313 ms
48,540 KB
testcase_45 AC 70 ms
27,144 KB
testcase_46 AC 89 ms
24,904 KB
testcase_47 AC 279 ms
45,924 KB
testcase_48 AC 181 ms
46,284 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.Numerics;

namespace No129_1 {
    public class Program {
        public static void Main(string[] args){
            var N = BigInteger.Parse(Console.ReadLine());
            var M = BigInteger.Parse(Console.ReadLine());
            var X = N / 1000 % M;

            Console.WriteLine(F(M) / F(X) / F(M - X) % 1000000000);
        }

        public static BigInteger F(BigInteger x){
            BigInteger result = 1;
            for(BigInteger i = 1; i <= x; i++){
                result *= i;
            }
            return result;
        }
    }
}
0