QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#74716 | #5003. Etched Emerald Orbs | Smallbasic# | WA | 2ms | 3292kb | C++14 | 554b | 2023-02-03 15:16:40 | 2023-02-03 15:16:41 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
__int128 k, x, y;
inline __int128 read() {
__int128 x = 0;
char ch = getchar();
while (!isdigit(ch)) ch = getchar();
while (isdigit(ch)) x = (x * 10) + (ch & 15), ch = getchar();
return x;
}
inline void otp(__int128 x) {
(x >= 10) ? otp(x / 10), putchar((x % 10) ^ 48) : putchar(x ^ 48);
}
int main() {
k = read();
if (!(k & 1)) {
k /= 2;
otp(k + 1); putchar(' '); otp((k + 1) * k);
} else {
x = (k + 1) / 2;
otp(x); putchar(' '); otp(x * k);
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 2ms
memory: 3228kb
input:
5
output:
3 15
result:
ok single line: '3 15'
Test #2:
score: 0
Accepted
time: 1ms
memory: 3292kb
input:
7
output:
4 28
result:
ok single line: '4 28'
Test #3:
score: -100
Wrong Answer
time: 2ms
memory: 3228kb
input:
2625
output:
1313 3446625
result:
wrong answer 1st lines differ - expected: '2415 2875', found: '1313 3446625'