题解列表

筛选

STL unordered_set完美解决问题

摘要:解题思路:把字符串中只出现一次的字符保存到set里。注意事项:题意要求输出第一次出现字符,所以需要遍历两次字符串。参考代码:#include <iostream>#include <string>#i……

编写题解 2841: 大整数加法

摘要:解题思路:求出最长字符串的长度,相加时只需让相加之后的答案位数多一位因为相同长度的数字相加最大只会向前进一位,如9+9=18,99+99=198.最后只需判断第一位是否为,零为0不打印,反之,打印。注……

无聊的星期六

摘要:解题思路:正则就不用了。注意事项:参考代码:import sys for line in sys.stdin:     if line=="End of file":         exit(……

无聊的星期六

摘要:解题思路:注意事项:参考代码:import sys for str in sys.stdin:     str=list(map(int,str.split()))     max=0    ……

无聊的星期六

摘要:解题思路:注意事项:参考代码:st=list(map(int,input().split())) print(&#39;&#39;.join(str(&#39;%-8d&#39; % i) for ……

无聊的星期六

摘要:解题思路:注意事项:参考代码:x=input() if int(x)==sum(((int(x[i])**3) for i in range(3))):     print(1) else: ……

无聊的星期六

摘要:解题思路:注意事项:参考代码:ci=0 for x in range(100,999):     x=str(x)     if int(x)==sum(((int(x[i])**3) for ……

题解 2901: 查找特定的值

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;const int N = 1e7;ll……

python--study||O.o

摘要:参考代码:n = int(input()) res = [[0] * n for _ in range(n)] num = 1 #将需要构造的矩形分为左上三角形和右下三角形两个部分 #所有待写……