Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
101951 Tom0 换零钱2 C++ Accepted 100 0 MS 240 KB 298 2023-09-11 14:31:59

Tests(10/10):


#include <iostream> #include <algorithm> using namespace std; typedef long long LL; LL n, ans; int main() { cin >> n; for (int i = 1; i <= n/10; i++) { int j = (n - i*10) / 5; ans += j; if (j && i * 10 + j * 5 == n) ans--; } cout << ans << endl; return 0; }


Judgement Protocol: