QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#60400#4446. Link is as bearqinjianbin#WA 338ms3536kbC++17455b2022-11-04 13:39:362022-11-04 13:39:40

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-11-04 13:39:40]
  • 评测
  • 测评结果:WA
  • 用时:338ms
  • 内存:3536kb
  • [2022-11-04 13:39:36]
  • 提交

answer

#include<bits/stdc++.h>
#define rep(i, a, b) for(int i = (a); i < (b); i++) 
#define _for(i, a, b) for(int i = (a); i <= (b); i++) 
using namespace std;

typedef long long ll;
int n;

int main()
{
	int T; scanf("%d", &T);
	while(T--)
	{
		scanf("%d", &n);
		ll ans = 0;
		_for(i, 1, n)
		{
			ll x; scanf("%lld", &x);
			_for(j, 0, 62)
				if(x & (1LL << j))
					ans |= 1LL << j;
		}	
		printf("%lld\n", ans);
	}

	return 0; 
} 

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 338ms
memory: 3536kb

input:

22222
100000
595189703884863 72716684812661 449525802123580 504421888022388 390139608591346 108895143840760 170477720052912 185583843894744 201608404318832 128831549357316 521084715261656 668960191579878 573530403227342 489014525501629 56366633717911 1705111713690 227582321537214 710815946393065 169...

output:

1125899906842623
1125899906842623
1125899906842623
1125899906842623
1125899906842623
1125899906842623
1125899906842623
1125899906842623
1125899906842623
1125899906842623
1125899906842623
1125899906842623
1125899906842623
1125899906842623
1125899906842623
1125899906842623
1125899906842623
11258999068...

result:

wrong answer 2223rd lines differ - expected: '1125219729113966', found: '1125899906842623'