1197: 发工资咯(Java)
摘要: import java.util.Scanner;
public class Main {
public static void main(String……
编写题解 1197: 发工资咯
摘要:解题思路:注意事项:参考代码:#include "stdio.h"int main() { int n; int M; while (scanf("%d", &n) != EOF) {int k =……
1197: 发工资咯(贪心算法)
摘要:核心:票票从大开始扣,数量是最少的代码:while True:
l = [int(x) for x in input().split()]
n = l[0]
if n =……
divmod(x, y)函数,集商和余数于一体
摘要: # a, b = divmod(x, y) divmod()函数会返回两个值,第一个为 x // y, 第二个返回值为 x % y
MoneyVariety_lis =……
str = replace(old, new)替换所有空格
摘要:就这????
就这???
while 1:
st = input()
NewSt = st.replace(' ', '')
print……
1197: 发工资咯
摘要:解题思路:sum要从新置零,从新置零,从新置零。垃圾,错这么多次了还不长记性,对自己无语了。注意事项:参考代码:#include<stdio.h>#include<stdlib.h>int main(……
1197: 发工资咯
摘要:解题思路:注意事项:参考代码:def coin_change(n):
coins = [100, 50, 10, 5, 2, 1]
num = []
for coin i……
小白随便写的,记录一下
摘要:```python
rmb = [100, 50, 10, 5, 2, 1]
def change_money(li):
new_li = [0 for i in range(len(r……