ICode9

精准搜索请尝试: 精确搜索
  • 哈理工新生赛补题2021-11-30 00:00:09

    https://ac.nowcoder.com/acm/contest/25080 第一题太简单略过 第二题 贪心:注意两种情况,5元纸币够用和5元纸币不够用;                         if从句搞定 #include <stdio.h> int main(){ long long int n,a,cnt5,cnt1; scanf("%d %d",&n,&a); cnt5 = a / 5; i

  • 2018省赛A组第3题2021-04-15 19:32:30

     解析   10可以看成2*5,因此求出含有2的因子和含有5的因子这两种数的个数,求最小就可以了。       #include<bits/stdc++.h> using namespace std; void get_ans() { int cnt5=0,cnt2=0; ifstream infile; infile.open("input.txt"); for(int i=0;i<10;i++){

  • 【数据结构】算法 Lemonade Change 柠檬水零钱2021-04-10 11:04:58

    目录Lemonade Change 任务调度器思路tag Lemonade Change 任务调度器 At a lemonade stand, each lemonade costs $5. Customers are standing in a queue to buy from you, and order one at a time (in the order specified by bills). Each customer will only buy one lemonad

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有