Moved kattis from Uni repo
This commit is contained in:
26
kattis/problems/02_11_23/knotknowledge/main.c
Normal file
26
kattis/problems/02_11_23/knotknowledge/main.c
Normal file
@ -0,0 +1,26 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int n;
|
||||
scanf("%d", &n);
|
||||
|
||||
int sum = 0;
|
||||
|
||||
for (int i=0; i<n; i++) {
|
||||
int temp;
|
||||
scanf("%d", &temp);
|
||||
sum += temp;
|
||||
}
|
||||
|
||||
int otherSum = 0;
|
||||
for (int i=0; i<n-1; i++) {
|
||||
int temp;
|
||||
scanf("%d", &temp);
|
||||
otherSum += temp;
|
||||
}
|
||||
|
||||
printf("%d\n", sum - otherSum);
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user