結果

問題 No.3045 怪文書
ユーザー bluemeganebluemegane
提出日時 2019-04-02 14:04:11
言語 C#(csc)
(csc 3.9.0)
結果
TLE  
実行時間 -
コード長 363 bytes
コンパイル時間 2,395 ms
コンパイル使用メモリ 99,940 KB
実行使用メモリ 22,948 KB
最終ジャッジ日時 2023-08-19 21:56:29
合計ジャッジ時間 7,311 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
22,836 KB
testcase_01 AC 58 ms
22,724 KB
testcase_02 AC 58 ms
20,724 KB
testcase_03 AC 59 ms
22,948 KB
testcase_04 AC 58 ms
20,732 KB
testcase_05 AC 59 ms
20,756 KB
testcase_06 AC 61 ms
22,800 KB
testcase_07 AC 61 ms
18,612 KB
testcase_08 AC 60 ms
20,756 KB
testcase_09 AC 64 ms
22,788 KB
testcase_10 AC 62 ms
22,728 KB
testcase_11 AC 63 ms
22,652 KB
testcase_12 AC 63 ms
20,692 KB
testcase_13 TLE -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class Hello
{
    static void Main()
    {
        string[] line = Console.ReadLine().Trim().Split(' ');
        var n = int.Parse(line[0]);
        var m = int.Parse(line[1]);
        var ans = 1L;
        for (int i = 1; i <= n; i++)
        {
            ans *= i;
            ans %= m;
        }
        Console.WriteLine(ans);
    }
}

0