結果
問題 |
No.8045 怪文書
|
ユーザー |
![]() |
提出日時 | 2019-04-02 15:24:29 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 24 ms / 2,000 ms |
コード長 | 462 bytes |
コンパイル時間 | 825 ms |
コンパイル使用メモリ | 102,656 KB |
実行使用メモリ | 17,920 KB |
最終ジャッジ日時 | 2024-11-30 01:38:21 |
合計ジャッジ時間 | 2,219 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 20 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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]); int ans; if (n >= m) ans = 0; else { ans = 1; for (int i = 1; i <= n; i++) { ans *= i; ans %= m; } } Console.WriteLine(ans); } }