結果

問題 No.1713 trick or treat!
ユーザー ks2mks2m
提出日時 2021-10-22 21:21:49
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 323 bytes
コンパイル時間 2,083 ms
コンパイル使用メモリ 74,948 KB
実行使用メモリ 57,556 KB
最終ジャッジ日時 2023-10-24 12:08:57
合計ジャッジ時間 3,730 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
56,216 KB
testcase_01 AC 124 ms
57,556 KB
testcase_02 AC 121 ms
57,408 KB
testcase_03 AC 121 ms
57,480 KB
testcase_04 AC 125 ms
57,212 KB
testcase_05 AC 125 ms
57,248 KB
testcase_06 AC 122 ms
57,160 KB
testcase_07 AC 122 ms
57,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		sc.close();

		int c = a | b;
		long ans = 1;
		for (int i = 1; i <= c; i++) {
			ans *= i;
		}
		System.out.println(ans);
	}
}
0