题解列表

筛选

组合数学题

摘要:解题思路:注意事项:参考代码:import sysread=lambda:int(sys.stdin.readline().strip())dpf={0:0,1:0}dph={0:0,1:0}def ……

1782基础解法(Python)

摘要:解题思路:一个更通用的解法注意事项:学习字典的元素添加方式和对字典进行简单排序的方法参考代码:import sysdic = {}for data in sys.stdin :    dic[data……

1806一行解(Python)

摘要:解题思路:将sys.stdin的内容转换为列表形式后打印即可注意事项:参考代码:print(input().split()[1])……

1211基础解法(Python)

摘要:注意事项:用import sys的情况下进行多行输入第一个测试点有问题,但是结果没有错误,所以这两种方式有什么区别呢?参考代码:while True:    try:        a,b = map……

1159基础解法(Python)

摘要:解题思路:滑动区间的思想即可注意事项:注意解题的限制参考代码:import sysfor data in sys.stdin :    a, b = map(int, data.split())   ……

python水仙花数判断

摘要:解题思路:直接用到pow函数注意事项:注意符号参考代码:for i in range(100,999):    a=int(i%10)    b=int(i/10%10)    c=int(i/100……

1072基础解法(Python)

摘要:解题思路:简单思路注意事项:了解divmod()函数的基础用法参考代码:import sysfor line in sys.stdin :    bot = int(line)    if bot =……

1129:两行代码

摘要:解题思路:注意事项:参考代码:for x in sorted(map(int, input().split()), reverse=True):     print(x, end=' &#3……