QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#875727 | #10015. Counting Orthogonal Pairs | asdfsdf# | AC ✓ | 10ms | 3712kb | C++23 | 344b | 2025-01-30 11:11:24 | 2025-01-30 11:11:24 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define MOD 998244353
void solve() {
ll N;
cin >> N;
if (N & 1) {
cout << 0 << '\n';
return;
}
ll a = N / 2;
a--;
a *= N;
cout << a << '\n';
}
signed main() {
ios::sync_with_stdio(false), cin.tie(0);
int T;
cin >> T;
while (T--) solve();
}
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 3712kb
input:
3 5 4 10836006
output:
0 4 58709502180012
result:
ok 3 number(s): "0 4 58709502180012"
Test #2:
score: 0
Accepted
time: 10ms
memory: 3712kb
input:
100000 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 1...
output:
0 4 0 12 0 24 0 40 0 60 0 84 0 112 0 144 0 180 0 220 0 264 0 312 0 364 0 420 0 480 0 544 0 612 0 684 0 760 0 840 0 924 0 1012 0 1104 0 1200 0 1300 0 1404 0 1512 0 1624 0 1740 0 1860 0 1984 0 2112 0 2244 0 2380 0 2520 0 2664 0 2812 0 2964 0 3120 0 3280 0 3444 0 3612 0 3784 0 3960 0 4140 0 4324 0 4512...
result:
ok 100000 numbers