Preparando MOJI

Diophantine equation

2000ms 262144K

Description:

You are given an equation A * X + B * Y = C, A, B, C are positive integer coefficients, X and Y are variables which can have positive integer values only. Output the number of solutions of this equation and the solutions themselves.

Input:

The only line of input contains integers A, B and C (1 ≤ A, B, C ≤ 1000), separated with spaces.

Output:

In the first line of the output print the number of the solutions N. In the next N lines print the solutions, formatted as "XY", sorted in ascending order of X, one solution per line.

Sample Input:

3 5 35

Sample Output:

2
5 4
10 1

Sample Input:

3 35 5

Sample Output:

0

Informação

Codeforces

Provedor Codeforces

Código CF530C

Tags

*special

Submetido 0

BOUA! 0

Taxa de BOUA's 0%

Datas 09/05/2023 08:57:18

Relacionados

Nada ainda