https://codeforces.com/contest/1118/problem/A

(python-codefoces)Codeforces Round #540 (Div. 3) A. Water Buying

python代码:

import math
q=int(input())
for i in range(q):
    n,a,b=map(int,input().split())
    z=(math.floor(n/2)*min(2*a,b)+(n%2)*a)
    print(z)

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-25
  • 2021-05-14
  • 2021-06-13
  • 2021-06-22
猜你喜欢
  • 2021-12-25
  • 2021-08-07
  • 2021-07-09
  • 2021-11-07
  • 2021-08-04
  • 2022-12-23
相关资源
相似解决方案