結果

問題 No.581 XOR
ユーザー GodNegotoGodNegoto
提出日時 2019-11-29 11:44:22
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 362 bytes
コンパイル時間 3,307 ms
コンパイル使用メモリ 74,796 KB
実行使用メモリ 56,120 KB
最終ジャッジ日時 2024-04-30 22:51:29
合計ジャッジ時間 4,667 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
54,272 KB
testcase_01 AC 114 ms
54,116 KB
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

package algo;

import java.util.*;

public class sample7 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	int A = Integer.parseInt(Integer.toBinaryString(sc.nextInt()));
	int C = Integer.parseInt(Integer.toBinaryString(sc.nextInt()));
	int B = 0;
	B = A ^ C;
	System.out.println(Integer.parseInt(Integer.toString(B), 2));
	}
}
0