扎男_
扎男_
全部文章
分类
题解(3)
归档
标签
去牛客网
登录
/
注册
扎男_的博客
无人问津的港口总会开满鲜花
全部文章
(共64篇)
题解 | 统计每个月兔子的总数
活动地址: 牛客春招刷题训练营 - 编程打卡活动#pragma clang diagnostic push#pragma ide diagnostic ignored "cppcoreguidelines-narrowing-conversions"#pragma ide dia...
2025-03-27
0
19
题解 | 构造C的歪
活动地址: 牛客春招刷题训练营 - 编程打卡活动import sysa,b = map(int,input().split()) # 先输入a和 b print(2*b-a) # 因为是满足等差数列的 所以 b= a+d c=b+d=a+d+d=b+(b-a) = 2*b-a 活动地址: 牛...
2025-03-25
0
28
题解 | 截取字符串
活动地址: 牛客春招刷题训练营 - 编程打卡活动#include<bits/stdc++.h>using namespace std;#define mod 1000000007typedef long long ll;#define int long longinline ll r...
2025-03-25
0
17
题解 | 杨辉三角的变形
活动地址: 牛客春招刷题训练营 - 编程打卡活动#include<iostream>using namespace std;int main(){ int num; while(cin>>num){ // 多列几个找下规律 发现 n=5 时 是 2...
2025-03-24
0
19
题解 | 不要三句号的歪
活动地址: 牛客春招刷题训练营 - 编程打卡活动#include <iostream>#include <sstream>#include <string>#include <vector>using namespace std;//如果我们想得到类似...
2025-03-24
0
22
题解 | 蛇形矩阵
import sys n = int(input().strip()) for i in range(1,n+1) : for j in range(i,n+1) : # 输出的公式是转化后的,其实也可以写去括号前,int()的作用是将结果转化成整型,因为计算结果是有小数的,en...
2025-03-23
1
33
题解 | 判断两个IP是否属于同一子网
活动地址: 牛客春招刷题训练营 - 编程打卡活动import syswhile True: try: x = input().split('.') # 数据输入 y = input().split('.') z = input().split('.')...
2025-03-23
1
32
题解 | 从单向链表中删除指定值的节点 活动地址: 牛客春招刷题训练营 - 编程打卡活动
#include <bits/stdc++.h>using namespace std;int a[1010];int main() { int n,k,x,y,m=1; cin>>n>>x; a[m++]=x; for(int i=...
2025-03-23
1
20
题解 | 数字颠倒
#include<bits/stdc++.h>// 万能头#include <string>using namespace std;int main(){ int n; string s; // 定义 cin>>s;// 字符串输入 rev...
2025-03-23
1
20
题解 | 求int型正整数在内存中存储时1的个数
活动地址: 牛客春招刷题训练营 - 编程打卡活动#include<iostream>#include<bits/stdc++.h>// 函数所属的 头文件 //其实我也忘记是哪个了就用万能头了using namespace std;int main(){ int n; ...
2025-03-21
1
18
首页
上一页
1
2
3
4
5
6
7
下一页
末页