結果
問題 | No.1713 trick or treat! |
ユーザー | マサ |
提出日時 | 2021-12-28 15:00:38 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 150 ms / 2,000 ms |
コード長 | 383 bytes |
コンパイル時間 | 2,969 ms |
コンパイル使用メモリ | 74,524 KB |
実行使用メモリ | 42,072 KB |
最終ジャッジ日時 | 2024-04-10 05:55:41 |
合計ジャッジ時間 | 4,308 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 133 ms
41,500 KB |
testcase_01 | AC | 147 ms
41,740 KB |
testcase_02 | AC | 147 ms
41,868 KB |
testcase_03 | AC | 146 ms
42,072 KB |
testcase_04 | AC | 143 ms
41,676 KB |
testcase_05 | AC | 143 ms
41,732 KB |
testcase_06 | AC | 150 ms
41,436 KB |
testcase_07 | AC | 146 ms
41,544 KB |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long trick = sc.nextInt(); long treat = sc.nextInt(); long n = trick | treat; long factorial = 1; for(long i = 1; i < n; i++) { factorial = factorial * (i + 1); } System.out.println(factorial); } }