結果
| 問題 |
No.500 階乗電卓
|
| コンテスト | |
| ユーザー |
akitsu818
|
| 提出日時 | 2017-04-30 22:31:52 |
| 言語 | Java (openjdk 23) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 310 bytes |
| コンパイル時間 | 2,376 ms |
| コンパイル使用メモリ | 74,932 KB |
| 実行使用メモリ | 835,876 KB |
| 最終ジャッジ日時 | 2024-09-13 23:58:40 |
| 合計ジャッジ時間 | 7,695 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | MLE * 1 -- * 19 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String args[]){
Scanner cin = new Scanner(System.in);
long N = cin.nextLong();
System.out.println(func(N));
}
static long func(long n){
if(n==0){
return 1;
}else{
return n*func(n-1)%(long)Math.pow(10, 13);
}
}
}
akitsu818