提交时间:2023-09-12 13:54:25
运行 ID: 102208
# include <iostream> using namespace std; int main() { long long a , n , ans , s = 0 ; cin >> a ; if( a % 10 < 5 ) { n = a / 10 - 1 ; } else { n = a / 10 ; } if( ( a - 10 ) % 5 >= 1 ) { ans = ( a - 10 ) / 5 ; } else { ans = ( a - 10 ) / 5 - 1 ; } for( int i = ans ; i >= 0 ; i -= 2 ) { s += i ; } cout<<s; return 0; }