牛客291704351号
牛客291704351号
全部文章
题解
归档
标签
去牛客网
登录
/
注册
牛客291704351号的博客
全部文章
/ 题解
(共6篇)
题解 | #尼科彻斯定理#
找规律,没有去验证,找到了对应的数去输出,没有别的题解方便,但是比找出奇数list 再去求和快。 a = int(input()) b = a**3 c = b/a x = [] if c%2 !=0: x.append(c) for i in range(1,int((a+1)/2...
Python3
2022-06-03
0
204
题解 | #参数解析#
当时第一个引号时先记录,到了第二个引号 把与第一个引号之间的内容拼起来 a = input().split() b = '' c = [] for i in a: if '"' not in i and len(b) ==0: c.append(i) elif '"'...
Python3
2022-06-02
0
166
题解 | #配置文件恢复#
我这个方法应该也还不错奥 diro.append(['reboot','backplane','impossible']) diro.append(['backplane','abort','install first']) def abc(x): b = [] if ' ' no...
Python3
2022-05-30
0
208
题解 | #完全数计算#
#正常思路 ```a = int(input()) def abc(x): b = [] for i in range(1,x): if x%i ==0: b.append(i) c = 0 for j in b: ...
Python3
2022-05-27
0
161
题解 | #杨辉三角的变形#
a = int(input()) b = [[0 for i in range(2*a-1)] for i in range(a)] zhong =(2*a-1)//2 b[0][zhong] =1 for i in range(1,a): for j in range(len(b[0])): if...
Python3
2022-05-25
0
200
题解 | #提取不重复的整数#
a = input() b = [] c = ['.','.','abc', 'def', 'ghi', 'jkl', 'mno', 'pqrs', 'tuv', 'wxyz'] for k in a: list1 = str(k) list1.lower() if k >= 'A' and...
Python3
2022-05-09
1
225