結果
| 問題 | No.500 階乗電卓 |
| コンテスト | |
| ユーザー |
suzu
|
| 提出日時 | 2023-05-24 14:20:51 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 368 bytes |
| 記録 | |
| コンパイル時間 | 551 ms |
| コンパイル使用メモリ | 103,680 KB |
| 実行使用メモリ | 27,904 KB |
| 最終ジャッジ日時 | 2026-05-29 16:24:03 |
| 合計ジャッジ時間 | 7,371 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | 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;
using System.Linq;
using System.Collections.Generic;
namespace yukicoder
{
class pg
{
static void Main(string[] args)
{
long N = long.Parse(Console.ReadLine());
long ans = 1;
long mod = 1000000000000;
for(long i = 1;i <= N;i++)
{
ans = (ans * i) % mod ;
Console.WriteLine(ans);
}
Console.WriteLine(ans);
}
}
}
suzu