結果

問題 No.1569 Nixoracci's Number
ユーザー kotatsugame
提出日時 2021-06-29 20:52:31
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 188 bytes
コンパイル時間 483 ms
コンパイル使用メモリ 64,500 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-27 13:27:05
合計ジャッジ時間 1,267 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
using namespace std;
int N;
long K,A[201];
main()
{
	cin>>N>>K;
	long X=0;
	for(int i=0;i<N;i++)
	{
		cin>>A[i];
		X^=A[i];
	}
	A[N]=X;
	K--;
	cout<<A[K%(N+1)]<<endl;
}
0