Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int i = 1;
- float res = 0;
- float x = -1;
- while (x != 0)
- {
- scanf("%f", &x);
- if (i % 4 == 0 && x > 150) x *= 0.9;
- res += x;
- i++;
- }
- if (res - (int)res > 1e-4) res = (int) res + 1;
- long long ans = res;
- printf("%lld", ans);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement