aboutsummaryrefslogtreecommitdiff
path: root/test/012_math_permsign/permsign_tests.c
blob: f5a52d0cb69ddd16f5bae079012faa61b7007045 (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(size_t n, const uint8_t *);

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

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

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

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

Generated with cgit - Back to sebastiano.tronto.net