Skip to content

Instantly share code, notes, and snippets.

@yurahuna
Created September 20, 2016 10:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yurahuna/f653474ae54f6ef45d9e7a0e2390a5c5 to your computer and use it in GitHub Desktop.
Save yurahuna/f653474ae54f6ef45d9e7a0e2390a5c5 to your computer and use it in GitHub Desktop.
signed main() {
std::ios::sync_with_stdio(false);
std::cin.tie(0);
int N, d;
cin >> N >> d;
vi p(N);
rep(i, N) cin >> p[i];
int ans = 0;
rep(i, N) ans += max(0ll, p[i] - d);
if (ans == 0) {
cout << "kusoge" << endl;
} else {
cout << ans << endl;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment