Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdio>
- int main () {
- int k, n;
- int array[100];
- scanf("%d%d", &k, &n);
- for (int i=1; i<=100; i++){
- scanf ("%d", &array[i]);
- }
- int sum=0;
- for (int i=1; i<=100; i++) {
- sum+=array[i];
- }
- printf("%d", sum-(n*k));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment