QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#225931#3135. Mining aAbtahi#AC ✓0ms3732kbC++20727b2023-10-25 12:21:552023-10-25 12:21:56

Judging History

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

  • [2023-10-25 12:21:56]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3732kb
  • [2023-10-25 12:21:55]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int,int> pii;
typedef vector<int> vii;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef unordered_map<int,int> umap;
typedef long double ld;
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define popcount __builtin_popcount
#define case cout<<"Case "<<__testcase-testcase<<": ";
#define endl '\n'
int a[100];
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int testcase=1;
    cin>>testcase;
    int __testcase=testcase;
    while(testcase--){
        ll n;
        cin>>n;
    cout<<((n*(n+1))^(n+1))<<endl;

    }
}






詳細信息

Test #1:

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

input:

3
6
7
10

output:

45
48
101

result:

ok 3 lines

Test #2:

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

input:

3
1
2
7777777

output:

0
5
60493819864864

result:

ok 3 lines

Test #3:

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

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