結果

問題 No.581 XOR
ユーザー fal_rndfal_rnd
提出日時 2017-11-11 02:33:20
言語 Java21
(openjdk 21)
結果
AC  
実行時間 45 ms / 2,000 ms
コード長 2,251 bytes
コンパイル時間 2,384 ms
コンパイル使用メモリ 75,052 KB
実行使用メモリ 49,292 KB
最終ジャッジ日時 2023-08-16 06:13:34
合計ジャッジ時間 3,511 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
49,108 KB
testcase_01 AC 45 ms
49,260 KB
testcase_02 AC 44 ms
49,044 KB
testcase_03 AC 44 ms
49,220 KB
testcase_04 AC 44 ms
49,292 KB
testcase_05 AC 44 ms
49,032 KB
testcase_06 AC 44 ms
49,144 KB
testcase_07 AC 44 ms
49,132 KB
testcase_08 AC 45 ms
49,148 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.stream.IntStream;

class Main{
	static class System{
		private static final InputStream in=java.lang.System.in;
		private static final PrintWriter out=new PrintWriter(java.lang.System.out,false);
	}
	public static void main(String[]$) throws IOException{
		new Main().solve();
		System.out.flush();
	}
	static FastScanner s=new FastScanner(System.in);
	static IntStream REPS(int v){return IntStream.range(0,v);}
	static IntStream REPS(int l,int r){return IntStream.rangeClosed(l,r);}
	static int gInt() throws IOException{return s.nextInt();}
	static long gLong() throws IOException{return s.nextLong();}
	static long gDouble() throws IOException{return s.nextLong();}

	private void solve() throws IOException{
		System.out.println(gLong()^gLong());
	}

	private static class FastScanner{
		private final BufferedInputStream	in;
		private static final int			bufSize	=1<<16;
		private final byte					buf[]	=new byte[bufSize];
		private int							i		=bufSize;
		private int							k		=bufSize;
		private final StringBuilder			str		=new StringBuilder();

		FastScanner(InputStream in){
			this.in=new BufferedInputStream(in,bufSize);
		}
		int nextInt() throws IOException{
			return (int)nextLong();
		}
		long nextLong() throws IOException{
			int c;
			long x=0;
			boolean sign=true;
			while((c=nextChar())<=32)
				;
			if(c=='-'){
				sign=false;
				c=nextChar();
			}
			if(c=='+'){
				c=nextChar();
			}
			while(c>='0'){
				x=x*10+(c-'0');
				c=nextChar();
			}
			return sign?x:-x;
		}
		int nextChar() throws IOException{
			if(i==k){
				k=in.read(buf,0,bufSize);
				i=0;
			}
			return i>=k?-1:buf[i++];
		}
		String next() throws IOException{
			int c;
			str.setLength(0);
			while((c=nextChar())<=32&&c!=-1)
				;
			if(c==-1){
				return null;
			}
			while(c>32){
				str.append((char)c);
				c=nextChar();
			}
			return str.toString();
		}
		String nextLine() throws IOException{
			int c;
			str.setLength(0);
			while((c=nextChar())<=32&&c!=-1)
				;
			if(c==-1){
				return null;
			}
			while(c!='\n'){
				str.append((char)c);
				c=nextChar();
			}
			return str.toString();
		}
	}
}
0