Is this an arithmetic progression?
Given 3 numbers
a
, b
, and c
your task is to determine if those 3 numbers could form an arithmetic progression. Print arithmetic progression
in case those 3 numbers could be part of an arithmetic progression and no pattern found
otherwise.Definition of an Arithmetic Progression
An arithmetic progression is a sequence of numbers where each term is obtained by adding a fixed number to the previous term. For example, -4, -2, 0, 2, 4 is an arithmetic progression because each term is obtained by adding 2 to the previous term (-4 + 2 = -2, -2 + 2 = 0, and so on).
Input | Output |
1
2
3 | arithmetic progression |
1
2
2 | no pattern found |
Constraints
Time limit: 2 seconds
Memory limit: 512 MB
Output limit: 1 MB