結果

問題 No.500 階乗電卓
ユーザー kuramubonnkuramubonn
提出日時 2023-02-04 17:18:43
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 375 bytes
コンパイル時間 1,860 ms
コンパイル使用メモリ 71,828 KB
実行使用メモリ 56,184 KB
最終ジャッジ日時 2023-09-16 13:50:46
合計ジャッジ時間 5,711 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,732 KB
testcase_01 AC 124 ms
55,804 KB
testcase_02 AC 121 ms
55,728 KB
testcase_03 AC 123 ms
56,180 KB
testcase_04 AC 122 ms
55,944 KB
testcase_05 AC 122 ms
55,888 KB
testcase_06 AC 124 ms
56,168 KB
testcase_07 AC 120 ms
55,656 KB
testcase_08 AC 123 ms
55,752 KB
testcase_09 AC 123 ms
56,068 KB
testcase_10 AC 123 ms
55,968 KB
testcase_11 AC 121 ms
56,184 KB
testcase_12 AC 123 ms
56,088 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 127 ms
55,576 KB
testcase_16 AC 128 ms
55,340 KB
testcase_17 AC 125 ms
55,584 KB
testcase_18 AC 124 ms
55,612 KB
testcase_19 AC 123 ms
55,816 KB
testcase_20 AC 122 ms
55,836 KB
testcase_21 AC 123 ms
55,680 KB
testcase_22 AC 125 ms
55,732 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long num = sc.nextLong(),data = 1;
		if(num >= 50) {
			System.out.println("000000000000");
			return;
		}
		long mod = (long)100000 * 10000000;
		for(int i = 1;i <= num ; i++) data = (((long)data % mod) * i) % (long)mod;
		System.out.println(data);
	}
}
0