提交时间:2023-09-11 14:31:59
运行 ID: 101951
#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; }