ACM_ICPC/Problems/6465 (rev. 1.1)
황현 ¶
#include <stdio.h>
int main() {
int c, z = 0, y, i, l, u, s, d;
scanf("%d", &c);
for(; z < c; ++z) {
scanf("%d", &i);
s = 0;
scanf("%d", &l);
for(y = 0; y < 14; ++y) {
scanf("%d", &u);
d = u - l;
l = u;
if(d == 1)
++s;
}
printf("%d %d\n", i, s);
}
return 0;
}