题目链接

很久之前写的了,好像是对拍打表过的,推一下就行了。

 

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    ll a,b,c;
    scanf("%lld%lld%lld",&a,&b,&c);
    ll ans=c*3;
    if((a>=1&&b>=1)||(a>=2))
    printf("%lld\n",ans+a+b*2);
    else if(a==0&&b==0)
    printf("%lld\n",c);
    else if((a==0&&b==1)||(a==1&&b==0))
    printf("%lld\n",c*2+1);
    else if(b==0)
    printf("%lld\n",c);
    else if(c==0)
    printf("%lld\n",b);
    else
    printf("%lld\n",c*3+b*2-2);
    return 0;
}

 

相关文章:

  • 2022-02-01
  • 2021-05-24
  • 2022-12-23
  • 2021-11-09
  • 2021-10-27
  • 2021-05-25
  • 2021-05-04
  • 2021-07-14
猜你喜欢
  • 2021-07-23
  • 2022-01-18
  • 2021-07-24
  • 2021-08-14
  • 2021-10-25
  • 2022-12-23
  • 2021-06-23
相关资源
相似解决方案