結果
| 問題 | No.500 階乗電卓 |
| コンテスト | |
| ユーザー |
akitsu818
|
| 提出日時 | 2017-04-20 23:13:55 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 375 bytes |
| 記録 | |
| コンパイル時間 | 2,388 ms |
| コンパイル使用メモリ | 82,348 KB |
| 実行使用メモリ | 2,479,480 KB |
| 最終ジャッジ日時 | 2026-04-02 18:27:36 |
| 合計ジャッジ時間 | 20,905 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge4_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 5 WA * 6 MLE * 9 |
ソースコード
import java.util.*;
public class Main{
public static void main(String args[]){
Scanner cin = new Scanner(System.in);
long target = cin.nextLong();
long tmp =(long) (func(target)%Math.pow(10,13));
System.out.println(tmp);
}
static long func(long x){
if (x==0){
return 1;
} else {
return x*func(x-1);
}
}
}
akitsu818