清烽
清烽
全部文章
分类
读书笔记(1)
题解(23)
归档
标签
去牛客网
登录
/
注册
清烽的博客
全部文章
(共24篇)
题解 | #矩阵乘法#
暴力破解 while True: try: x = int(input()) y = int(input()) z = int(input()) result1 = [] result2 = [] ...
Python3
2022-06-07
0
347
题解 | #配置文件恢复#
import re dic = {'reset':'reset what', 'reset board':'board fault', 'board add':'where to add', 'board delete':'no board at all',...
Python3
2022-06-05
0
334
题解 | #挑7#
while True: try: n = int(input()) count = 0 for i in range(1, n+1): if "7" in str(i) or i%7 == 0: ...
Python3
2022-06-04
0
320
题解 | #判断两个IP是否属于同一子网#
#判断IP地址是否有效 def isOK(s): for i in range(len(s)): if s[i] > 255 or s[i]<0: return False return True # 判断掩码是否正确 def is...
Python3
2022-06-03
1
541
题解 | #整数与IP地址间的转换#
位运算运用: int main(){ int s[4] = {0}; int i = 0; unsigned int sum = 0; unsigned int digt = 0; for(i = 0; i < 4; i++){ ...
C
2022-06-03
1
372
题解 | #查找兄弟单词#
from itertools import permutations while True: try: num = input().split(' ') n = int(num[0]) nums = num[1:n+1] x =...
Python3
2022-05-29
0
310
题解 | #密码验证合格程序#
python暴力解法: def isOK(num): if len(num) < 8: return "NG" ualpha = 0 lalpha = 0 digit = 0 other = 0 j = 0 while j...
Python3
2022-05-28
0
424
题解 | #删数#
思路:如果是第1个数和第二个数,每次都将除第一个数外的其他数往前挪一位,第一个数挪到最后一位; 如果是第3个数(每次都删除了数,所以这个数现在也在第一位),那就将除第一位数外的其他数往前挪一位。 第一位处理: 0 1 2 3 4 5 6 7 1 2 3 4 5 6 7 0(记录第一位数0,除第一位数...
C
数组
C
2022-05-25
3
541
题解 | #删数#
思路:如果是第1个数和第二个数,每次都将第一个数挪到最后一位,并将第一个数删掉; 如果是第3个数(每次都删除了数,所以这个数现在也在第一位),那就只删除第一个数 第一位处理: 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0(第一个数挪到第最后一位) 1 2 3 4 5 6 7 0...
Python3
2022-05-25
4
580
题解 | #字符串加密#
#include<ctype.h> int searchS(int *dp, int maxRoom, char ch) { for(int i = 0;i < maxRoom; i++) { if(dp[i] == ch) { re...
C
2021-10-21
0
484
首页
上一页
1
2
3
下一页
末页