結果
| 問題 |
No.500 階乗電卓
|
| コンテスト | |
| ユーザー |
akitsu818
|
| 提出日時 | 2017-04-20 23:13:55 |
| 言語 | Java (openjdk 23) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 375 bytes |
| コンパイル時間 | 2,169 ms |
| コンパイル使用メモリ | 75,128 KB |
| 実行使用メモリ | 832,196 KB |
| 最終ジャッジ日時 | 2024-07-19 21:18:32 |
| 合計ジャッジ時間 | 7,466 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | MLE * 1 -- * 19 |
ソースコード
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