fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define int long long int
  4. #define double long double
  5. #define print(a) for(auto x : a) cout << x << " "; cout << endl
  6.  
  7.  
  8. const int M = 1000000007;
  9. const int N = 3e5+9;
  10. const int INF = 2e9+1;
  11. const int LINF = 2000000000000000001;
  12.  
  13. inline int power(int a, int b) {
  14. int x = 1;
  15. a %= M;
  16. while (b) {
  17. if (b & 1) x = (x * a) % M;
  18. a = (a * a) % M;
  19. b >>= 1;
  20. }
  21. return x;
  22. }
  23.  
  24.  
  25. //_ ***************************** START Below *******************************
  26.  
  27.  
  28.  
  29. int consistency(int n){
  30.  
  31. return (n/2) * (n+1)/2;
  32. }
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40. void solve() {
  41.  
  42. int n;
  43. cin>> n;
  44.  
  45. cout << consistency(n) << endl;
  46.  
  47.  
  48. }
  49.  
  50.  
  51.  
  52.  
  53.  
  54. int32_t main() {
  55. ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
  56.  
  57. int t = 1;
  58. // cin >> t;
  59. while (t--) {
  60. solve();
  61. }
  62.  
  63. return 0;
  64. }
Success #stdin #stdout 0s 5312KB
stdin
29
stdout
210