Anche stavolta per ora vi presento i test effettuati.
Personalmente mi e' sembrato di capire che alcuni programmi funzionassero bene per le istanze con poche iterazioni, ma davano errori come "Bus Error" o "Segmentation Fault" per le istanze
con molte iterazioni. E credo che questi programmi allocassero troppa memoria (non era necessario allocare piu' memoria di quella occupata dai numeri in ingresso, implementando opportunamente la sottrazione).
Eccovi i test e i relativi output attesi:
Test 0
2
6
0
4
0
6
2
2
9
2
2
1
0
9
3
0
6
8
9
5
6
0
1
9
4
0
6
7
-1
2
0
3
9
0
2
1
1
0
4
9
1
6
8
6
8
2
3
7
2
6
3
6
3
5
1
2
7
-1
Output:
5002206470851693
Test 1
1
1
0
0
4
1
3
6
3
8
8
7
8
4
0
0
0
0
39
1
3
1
0
6
4
6
3
5
5
2
0
0
0
0
0
0
10
Output:
2520473760000
Test 2
3
2
7
7
0
2
7
8
2
4
1
5
2
3
2
0
1
6
9
1
8
4
7
6
2
2
9
7
2
0
5
6
9
1
3
4
3
2
3
5
3
0
8
7
6
6
9
7
6
9
6
1
2
8
9
-1
3
3
2
2
4
4
4
5
0
1
5
0
3
7
4
0
2
7
5
0
4
9
7
3
9
2
2
0
4
1
1
6
8
1
4
0
7
8
9
5
1
6
3
4
0
4
8
8
2
3
3
4
3
2
7
-1
Output:
1
Test 3
2
4
-1
1
8
-1
Output:
6
--
IvanoSalvo - 29 Nov 2004
--
IvanoSalvo - 09 Dec 2004