結果
問題 |
No.500 階乗電卓
|
ユーザー |
![]() |
提出日時 | 2018-05-22 23:58:36 |
言語 | Perl (5.40.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 249 bytes |
コンパイル時間 | 111 ms |
コンパイル使用メモリ | 5,632 KB |
実行使用メモリ | 5,760 KB |
最終ジャッジ日時 | 2024-06-28 15:55:51 |
合計ジャッジ時間 | 1,008 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 WA * 2 |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
#!/usr/bin/env perl use strict; use warnings; my $n = <>; chomp $n; my %h; $h{1} = 1; for (my $i = 2; $i < 50; $i++) { $h{$i} = ($h{$i - 1} * $i) % 1000000000000; } if ($n >= 50) { print "000000000000\n"; } else { printf("%d\n", $h{$n}); }