Codeforces_478_C

http://codeforces.com/problemset/problem/478/C

 

水。

 

#include<stdio.h>
int main()
{
    long long a,b,c,temp;
    scanf("%lld%lld%lld",&a,&b,&c);
    long long sum;
    if(a>=b && a>=c)
    {
        sum = b+c;
        temp = a;
    }
    else if(b>=a && b>=c)
    {
        sum = a+c;
        temp = b;
    }
    else
    {
        sum = a+b;
        temp = c;
    }
    if(sum <= temp/2)
    {
        printf("%lld\n",sum);
    }
    else
    {
        printf("%lld\n",(sum+temp)/3);
    }
}

 

posted @ 2016-09-14 14:47  zzzzzzzzhu  阅读(147)  评论(0编辑  收藏  举报