http://acm.sgu.ru/problem.php?contest=0&problem=297
什么也不说了,我专挑水题做的。
#include <stdio.h>
int main(void) {
int n, m;
scanf ("%d%d", &n, &m);
int i, tmp, sum = 0;
for (i = 0; i < m; ++i) {
scanf ("%d", &tmp);
sum += tmp;
}
printf ("%d\n", sum%n);
return 0;
}