結果
| 問題 | No.502 階乗を計算するだけ |
| コンテスト | |
| ユーザー |
masakt
|
| 提出日時 | 2017-04-07 23:49:33 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 292 bytes |
| コンパイル時間 | 1,952 ms |
| コンパイル使用メモリ | 109,876 KB |
| 実行使用メモリ | 33,212 KB |
| 最終ジャッジ日時 | 2024-07-16 03:21:57 |
| 合計ジャッジ時間 | 6,153 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 32 TLE * 1 -- * 19 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
class P
{
static void Main(string[] _)
{
decimal n = decimal.Parse(Console.ReadLine());
decimal r = 1;
for (decimal i = n; i >= 1; i--)
{
r = (r % 1000000007) * (i % 1000000007);
}
Console.WriteLine(r);
}
}
masakt