QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#595928#3135. Mining aMay_27th#AC ✓0ms3600kbC++20662b2024-09-28 14:47:542024-09-28 14:47:55

Judging History

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

  • [2024-09-28 14:47:55]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3600kb
  • [2024-09-28 14:47:54]
  • 提交

answer

// #pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")
// #pragma GCC target("avx2,bmi,bmi2,popcnt,lzcnt")
#include<bits/stdc++.h>
  
using namespace std;
  
#define i64 long long
#define mp make_pair
#define pb push_back
#define all(x) (x).begin(), (x).end()

const int MAXN = 2e5 + 5;
i64 N;
void Solve(void) {
  cin >> N;
  i64 cur = N * (N + 1);
  cout << (cur ^ (N + 1)) << "\n";
}
signed main() {
  ios_base::sync_with_stdio(false); cin.tie(0);
  cout << fixed << setprecision(10);
  int Tests = 1; cin >> Tests;    
  for (int i = 1; i <= Tests; i ++) {
    // cout << "Case " << i << ": ";
    Solve();    
  }
}

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3596kb

input:

3
6
7
10

output:

45
48
101

result:

ok 3 lines

Test #2:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

3
1
2
7777777

output:

0
5
60493819864864

result:

ok 3 lines

Test #3:

score: 0
Accepted
time: 0ms
memory: 3600kb

input:

20
5352
7774
898767
9999999
2019102
10000000
3424123
8998231
1234
1241564
8888959
5411738
200000
2345235
9902352
9092342
2909525
9090909
4532423
9191991

output:

28652481
60446397
807782253792
99999983156992
4076773743037
100000017825793
11724620970984
80968179092912
1525189
1541483271985
79013592252160
29286916841381
40000131073
5500131830120
98056577753857
82670700086701
8465341544152
82644644558968
20542867168176
84492699625520

result:

ok 20 lines