STL unordered_set完美解决问题 摘要:解题思路:把字符串中只出现一次的字符保存到set里。注意事项:题意要求输出第一次出现字符,所以需要遍历两次字符串。参考代码:#include <iostream>#include <string>#i…… 题解列表 2024年04月19日 0 点赞 0 评论 267 浏览 评分:0.0
编写题解 2841: 大整数加法 摘要:解题思路:求出最长字符串的长度,相加时只需让相加之后的答案位数多一位因为相同长度的数字相加最大只会向前进一位,如9+9=18,99+99=198.最后只需判断第一位是否为,零为0不打印,反之,打印。注…… 题解列表 2024年04月19日 0 点赞 0 评论 291 浏览 评分:0.0
无聊的星期六 摘要:解题思路:正则就不用了。注意事项:参考代码:import sys for line in sys.stdin: if line=="End of file": exit(…… 题解列表 2024年04月20日 0 点赞 0 评论 168 浏览 评分:0.0
无聊的星期六 摘要:解题思路:注意事项:参考代码:import sys for str in sys.stdin: str=list(map(int,str.split())) max=0 …… 题解列表 2024年04月20日 0 点赞 0 评论 245 浏览 评分:0.0
无聊的星期六 摘要:解题思路:注意事项:参考代码:st=list(map(int,input().split())) print(''.join(str('%-8d' % i) for …… 题解列表 2024年04月20日 0 点赞 0 评论 438 浏览 评分:0.0
题解 2804: 与指定数字相同的数的个数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;ll a[101];int main()…… 题解列表 2024年04月20日 0 点赞 0 评论 158 浏览 评分:0.0
无聊的星期六 摘要:解题思路:注意事项:参考代码:x=input() if int(x)==sum(((int(x[i])**3) for i in range(3))): print(1) else: …… 题解列表 2024年04月20日 0 点赞 0 评论 188 浏览 评分:0.0
无聊的星期六 摘要:解题思路:注意事项:参考代码:ci=0 for x in range(100,999): x=str(x) if int(x)==sum(((int(x[i])**3) for …… 题解列表 2024年04月20日 0 点赞 0 评论 431 浏览 评分:0.0
题解 2901: 查找特定的值 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;const int N = 1e7;ll…… 题解列表 2024年04月20日 0 点赞 0 评论 165 浏览 评分:0.0
python--study||O.o 摘要:参考代码:n = int(input()) res = [[0] * n for _ in range(n)] num = 1 #将需要构造的矩形分为左上三角形和右下三角形两个部分 #所有待写…… 题解列表 2024年04月20日 0 点赞 0 评论 226 浏览 评分:0.0