結果

問題 No.1277 級数入り級数
ユーザー 遭難者遭難者
提出日時 2020-10-20 19:05:58
言語 Java21
(openjdk 21)
結果
AC  
実行時間 513 ms / 2,000 ms
コード長 406 bytes
コンパイル時間 4,083 ms
コンパイル使用メモリ 71,848 KB
実行使用メモリ 56,244 KB
最終ジャッジ日時 2023-09-28 14:24:20
合計ジャッジ時間 20,781 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,780 KB
testcase_01 AC 123 ms
55,396 KB
testcase_02 AC 121 ms
55,576 KB
testcase_03 AC 120 ms
53,896 KB
testcase_04 AC 122 ms
55,716 KB
testcase_05 AC 121 ms
55,892 KB
testcase_06 AC 122 ms
55,648 KB
testcase_07 AC 123 ms
55,624 KB
testcase_08 AC 124 ms
55,860 KB
testcase_09 AC 332 ms
56,044 KB
testcase_10 AC 312 ms
56,240 KB
testcase_11 AC 350 ms
55,956 KB
testcase_12 AC 264 ms
56,168 KB
testcase_13 AC 195 ms
55,580 KB
testcase_14 AC 365 ms
55,804 KB
testcase_15 AC 500 ms
55,956 KB
testcase_16 AC 395 ms
55,856 KB
testcase_17 AC 408 ms
55,592 KB
testcase_18 AC 498 ms
56,128 KB
testcase_19 AC 507 ms
55,868 KB
testcase_20 AC 191 ms
55,800 KB
testcase_21 AC 318 ms
55,736 KB
testcase_22 AC 365 ms
55,724 KB
testcase_23 AC 242 ms
55,660 KB
testcase_24 AC 465 ms
55,776 KB
testcase_25 AC 413 ms
55,900 KB
testcase_26 AC 513 ms
55,560 KB
testcase_27 AC 144 ms
56,088 KB
testcase_28 AC 357 ms
56,068 KB
testcase_29 AC 187 ms
55,960 KB
testcase_30 AC 354 ms
55,512 KB
testcase_31 AC 427 ms
55,440 KB
testcase_32 AC 300 ms
55,836 KB
testcase_33 AC 497 ms
55,880 KB
testcase_34 AC 381 ms
55,732 KB
testcase_35 AC 185 ms
56,004 KB
testcase_36 AC 212 ms
55,968 KB
testcase_37 AC 210 ms
55,620 KB
testcase_38 AC 210 ms
55,876 KB
testcase_39 AC 473 ms
55,668 KB
testcase_40 AC 181 ms
55,988 KB
testcase_41 AC 428 ms
55,756 KB
testcase_42 AC 412 ms
55,760 KB
testcase_43 AC 160 ms
56,244 KB
testcase_44 AC 135 ms
56,108 KB
testcase_45 AC 293 ms
56,176 KB
testcase_46 AC 293 ms
55,580 KB
testcase_47 AC 295 ms
55,948 KB
testcase_48 AC 300 ms
55,552 KB
testcase_49 AC 361 ms
55,680 KB
testcase_50 AC 120 ms
55,816 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		int n = Integer.parseInt(sc.next());
		long q = 1;
		ou.println(q);
		for(int i = 2 ; i <= n ; i++){
			q *= i;
			q %= (int)Math.pow(10 , 9) + 7;
		}
		ou.println(q);
		ou.println(n);
		ou.flush();
		sc.close();
	}
}
0