【leetcode】拿硬币

int minCount(int* coins, int coinsSize){
    int count = 0;
    for (int i=0; i<coinsSize; i++)
    {
        count += coins[i]/2 + coins[i]%2;    
    }
    return count;
}

 

posted @ 2020-08-15 18:29  温暖了寂寞  阅读(143)  评论(0)    收藏  举报