結果
問題 | No.500 階乗電卓 |
ユーザー | suzu |
提出日時 | 2023-05-24 14:23:25 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 422 bytes |
コンパイル時間 | 2,923 ms |
コンパイル使用メモリ | 103,832 KB |
実行使用メモリ | 22,708 KB |
最終ジャッジ日時 | 2023-08-25 04:37:49 |
合計ジャッジ時間 | 4,202 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 54 ms
20,768 KB |
testcase_01 | AC | 53 ms
22,624 KB |
testcase_02 | AC | 53 ms
20,696 KB |
testcase_03 | AC | 53 ms
20,692 KB |
testcase_04 | AC | 54 ms
18,576 KB |
testcase_05 | AC | 54 ms
20,640 KB |
testcase_06 | AC | 53 ms
20,668 KB |
testcase_07 | AC | 54 ms
20,596 KB |
testcase_08 | AC | 55 ms
20,680 KB |
testcase_09 | AC | 55 ms
22,652 KB |
testcase_10 | AC | 54 ms
22,708 KB |
testcase_11 | AC | 53 ms
20,620 KB |
testcase_12 | AC | 55 ms
20,652 KB |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | AC | 55 ms
20,564 KB |
testcase_16 | AC | 51 ms
20,696 KB |
testcase_17 | AC | 54 ms
22,688 KB |
testcase_18 | AC | 52 ms
20,632 KB |
testcase_19 | AC | 53 ms
20,580 KB |
testcase_20 | AC | 53 ms
20,656 KB |
testcase_21 | AC | 53 ms
20,752 KB |
testcase_22 | AC | 53 ms
18,588 KB |
コンパイルメッセージ
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 ; if(ans == 0) { Console.WriteLine("000000000000"); return; } } Console.WriteLine(ans); } } }