QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#74716#5003. Etched Emerald OrbsSmallbasic#WA 2ms3292kbC++14554b2023-02-03 15:16:402023-02-03 15:16:41

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-02-03 15:16:41]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3292kb
  • [2023-02-03 15:16:40]
  • 提交

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'