题解列表

筛选

天才的两种解法

摘要:while True:     try:         # 从输入中读取一个6位的正整数,表示金币的总重量         k = int(input()) - 265716  # 减去初始值……

贪心盾神与积木游戏(超时有点烦)

摘要:解题思路:     贪心点:先帮差值最小的完成积木作品注意事项:参考代码:#  时间超限:   64 分      运行时间: 6803ms  m = int(input()) for _ in ……

欣赏天才之作

摘要:import math def find_defective_ball(N):     k = math.ceil(math.log(N, 3))     return k while Tru……

暴力寂寞的数

摘要:解题思路:想太多思维容易一坨,还是暴力吧。。注意事项:参考代码:def d(num):     temp = [int(i) for i in str(num)]     return num +……

暴力最小正整数

摘要:解题思路:想太多思维容易一坨,还是暴力吧。。注意事项:参考代码:def count(num):           #  统计十进制数num的二进制形式中‘1’的个数     cnt = 0   ……

看看天才怎么写的

摘要:def isprime(x):     if x < 2:         return False     for i in range(2, int(x**0.5) + 1):    &

贪心快乐司机

摘要:解题思路:跟金银岛一样,https://blog.dotcpp.com/a/98826注意事项:参考代码:n,w = map(int,input().split()) gi = []    # 重量……

最简洁的代码

摘要:def divisor_sum(n):     return sum(i for i in range(1, n) if n % i == 0) def is_True(a, b):     r……

Python才是最牛的,其他的就是Shit!

摘要:import math print(math.factorial(int(input())))Python 是一种易学易用且功能强大的高级编程语言,具有许多独特的优点,使其成为开发者和数据科学家们的……

计算并联电阻的阻值

摘要:解题思路:注意事项:参考代码:r1,r2=map(float,input().strip().split())R = 1/(1/r1 + 1/r2)print("%.2f"%R)……