牛客440904392号
牛客440904392号
全部文章
分类
归档
标签
去牛客网
登录
/
注册
牛客440904392号的博客
全部文章
(共258篇)
题解 | #单词识别#Python两行
from collections import Counter for s, count in sorted(Counter(input().strip('.').lower().split()).items()): print(s + ':' + str(count))
2024-10-04
1
123
1到10的5次方里就4个完数,直接打表输出就行。
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] ...
2024-10-04
1
149
题解 | #分组统计#这题的输出是真麻烦
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int m = sc.n...
2024-10-04
1
125
题解 | #编排字符串#用双端队列就行
from collections import deque dq = deque() for _ in range(int(input())): dq.append(input()) if len(dq) > 4: dq.popleft() for i in range...
2024-10-04
1
103
题解 | #日期累加#
//C++版代码 #include <iostream> #include <iomanip> using namespace std; int main() { int m; cin >> m; int days[] = {0, 31, ...
2024-10-04
1
107
题解 | #直角三角形#
#include <iostream> #include <cmath> #include <algorithm> #include <numeric> #include <iomanip> using namespace std; flo...
2024-10-04
1
106
题解 | #点的距离#
#include <iostream> #include <cmath> #include <iomanip> using namespace std; class CPoint { private: int x, y; public: CPoin...
2024-10-04
1
119
题解 | #弹地小球#除去起始高度,其余为等比数列求和。
for _ in range(int(input())): H, n = map(int, input().split()) print('%.2f' % (H * 2 * (1 - 0.5 ** (n - 1)) + H))
Python3
2024-10-04
1
141
题解 | #三角形相加#
class CTriangle: def __init__(self, x, y): self.x = x self.y = y def __add__(self, other): return CTriangle(self.x + o...
2024-10-04
1
108
题解 | #整型存储#
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); Revers...
2024-10-04
1
120
首页
上一页
12
13
14
15
16
17
18
19
20
21
下一页
末页