Universal Cup Judging System

Universal Cup

実行時間制限: 1 s メモリ制限: 512 MB 満点: 100 ハック可能 ✓
統計

整数 $n$ が与えられます。次の条件を満たす 3 つの整数 $a, b, c$ を求めてください。

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

そのような整数の三つ組が存在しない場合は、解が存在しないことを報告してください。

入力

入力には 1 つの整数 $n$ ($0 \le n \le 10^{18}$) が含まれます。

出力

解が存在しない場合は、$-1$ を出力してください。それ以外の場合は、すべての条件を満たす 3 つの整数 $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.