답안 #465297

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
465297 2021-08-15T14:07:39 Z rainboy Uzastopni (COCI17_uzastopni) C
80 / 80
3 ms 204 KB
#include <stdio.h>

int main() {
	long long n, a;

	scanf("%lld", &n), n *= 2;
	for (a = 2; a <= n / a; a++)
		if (n % a == 0 && (a + n / a) % 2 == 1)
			printf("%lld %lld\n", (n / a - a + 1) / 2, (n / a + a - 1) / 2);
	return 0;
}

Compilation message

uzastopni.c: In function 'main':
uzastopni.c:6:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
    6 |  scanf("%lld", &n), n *= 2;
      |  ^~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 1 ms 204 KB Output is correct
10 Correct 3 ms 204 KB Output is correct