aboutsummaryrefslogtreecommitdiff
path: root/test/012_math_permsign/permsign_tests.c
blob: fa8ce9b4db0a46d7d3288a24df1d05969aa8d695 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "../test.h"

int permsign(uint8_t *, int64_t);

void run(void) {
	char str[STRLENMAX];
	uint8_t a[100];
	int p;
	int64_t n, i;

	fgets(str, STRLENMAX, stdin);
	n = atoll(str);

	for (i = 0; i < n; i++) {
		fgets(str, STRLENMAX, stdin);
		a[i] = atoi(str);
	}

	p = permsign(a, n);
	printf("%d\n", p);
}

Generated with cgit - Back to sebastiano.tronto.net