Universal Cup Judging System

Universal Cup

حد الوقت: 1 s حد الذاكرة: 512 MB مجموع النقاط: 100 قابلة للهجوم ✓
الإحصائيات

정수 $n$이 주어진다. 다음 조건을 만족하는 세 정수 $a$, $b$, $c$를 구하여라.

  • $|a|, |b|, |c| \le 10^{18}$;
  • $n = ab(a + b) + bc(b + c) + ac(a + c)$.

그러한 세 정수가 존재하지 않으면 해가 없다고 보고하여라.

입력

입력은 정수 $n$ 하나를 포함한다 ($0 \le n \le 10^{18}$).

출력

해가 없으면 $-1$을 출력하여라. 그렇지 않으면 모든 조건을 만족하는 세 정수 $a$, $b$, $c$를 출력하여라.

올바른 답이 여러 개 있으면 그중 아무거나 하나를 출력하여라.

예제

입력 1

3

출력 1

-1

입력 2

6

출력 2

1 1 1

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.