usingnamespacestd; using LL = longlong; LL n, a, b; signed(){ while(~scanf("%lld%lld%lld",&n,&a,&b)) { LL ret = 1e18; for(LL i = 0; i <= 6; i++) { ret = min(ret, (n+1-i)/2*a+(i+2)/3*b); ret = min(ret, (n+2-i)/3*b+(i+1)/2*a); } printf("%lldn", ret); } return0; }
近期评论