fork download
  1. /**
  2.  * author: orzvanh14 ( Độc cô cầu đặc )
  3.  * created: 23.12.2022 10:08:02
  4.  * too lazy to update time
  5. **/
  6. // i wants to take ioi
  7. //binhtinhtutinkhongcaycunhungmotkhikhongcontutinnualatuyetvong
  8. #include <bits/stdc++.h>
  9.  
  10. using namespace std;
  11.  
  12. #define int long long
  13. #define nn "\n"
  14. #define pi pair<int, int>
  15. #define fi first
  16. #define se second
  17. #define lb lower_bound
  18. #define ub upper_bound
  19. #define eb emplace_back
  20. #define pb push_back
  21. #define TASK " "
  22.  
  23. #define ms(a, x) memset(a, x, sizeof(a))
  24. #define all(a) a.begin(), a.end()
  25. #define All(a, n) a + 1, a + 1 + n
  26.  
  27. #define LOG 19
  28.  
  29.  
  30. const int INF = 1e18;
  31. const int mod = 1e9+7;
  32. const int N = 1e5 + 5;
  33. const int maxn = 1e3 + 5;
  34. int MOD = 998244353;
  35. int bit[200000];
  36. struct node{
  37. int kc, u, hk;
  38. bool operator<(const node& other) const {
  39. return kc > other.kc;
  40. }
  41. };
  42. struct edge{
  43. int v, w, h;
  44. };
  45. int n, x;
  46. void nhap(){
  47. cin >> n >> x;
  48. }
  49. void solve(){
  50. if(n % 2 == 1){
  51. cout << x * (n / 2 + 1) << nn;
  52. }
  53. else cout << x * (n >> 1) << nn;
  54. }
  55. // 0 0 0 0 0 0 0
  56. signed main() {
  57. // freopen("WORK.INP", "r", stdin);
  58. // freopen("WORK.OUT", "w", stdout);
  59. ios_base::sync_with_stdio(0);
  60. cin.tie(0);
  61. cout.tie(0);
  62. nhap();
  63. solve();
  64. return 0;
  65.  
  66. }
  67. // https://i...content-available-to-author-only...e.com/7poJyz
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
0