怕黑的牛油为你答疑解惑
怕黑的牛油为你答疑解惑
全部文章
分类
归档
标签
去牛客网
登录
/
注册
怕黑的牛油为你答疑解惑的博客
TA的专栏
168篇文章
1人订阅
语法篇:C++入门
0篇文章
0人学习
Python:python入门
0篇文章
0人学习
Python:数据分析
16篇文章
854人学习
语法篇:基础语法
143篇文章
0人学习
题解 | #[NOIP2015]金币#
题解 | #判断是否为回文字符串#
笔试 面试 经验贴
8篇文章
3512人学习
算法篇:面试笔刷TOP101
1篇文章
0人学习
题解 | #二分查找-I#
全部文章
(共404篇)
题解 | #大吉大利,今晚吃鸡#
#include <iostream> #include <cmath> int main() { int n; while (std::cin >> n) { // 保证 n 在有效范围内 if (n < ...
2024-10-26
0
146
题解 | #大吉大利,今晚吃鸡#
def min_steps(n): if n == 0: return 0 else: # Recursive formula to calculate steps return 3 * min_steps(n - 1) + 2 de...
2024-10-26
0
120
题解 | #兔子的序列#
#include <iostream> #include <vector> #include <cmath> // For sqrt() function using namespace std; bool isPerfectSquare(int num) {...
2024-10-14
0
99
题解 | #兔子的序列#
import math def is_perfect_square(num): root = int(math.sqrt(num)) return root * root == num def find_max_non_square(numbers): max_non_s...
2024-10-14
0
98
题解 | #添加逗号#
#include <iostream> #include <string> #include <algorithm> using namespace std; // 先声明函数原型 string formatNumberWithCommas(int n); ...
2024-10-11
0
137
题解 | #添加逗号#
def format_number_with_commas(n): # 使用f-string格式化数字,':,'表示添加千位分隔符 return f"{n:,}" # 示例输入 input_number = int(input()) # 调用...
2024-10-11
0
125
题解 | #[NOIP2018]标题统计#
#include <iostream> #include <string> using namespace std; int countNonWhitespaceCharacters(const string& title) { int count = 0...
2024-10-11
2
151
题解 | #[NOIP2018]标题统计#
# 读取输入 s = input().strip() # strip() 可以去除行末的换行符 # 初始化计数器 count = 0 # 遍历字符串,统计非空格和非换行符的字符数量 for char in s: if char != " " and char != ...
2024-10-11
0
126
题解 | #扫雷#
#include <iostream> #include <vector> #include <array> using namespace std; bool isValid(int x, int y, int n, int m); int countMi...
2024-10-10
1
105
题解 | #扫雷#
def generate_minesweeper_matrix(n, m, matrix): # Directions array for 8 neighboring cells directions = [(-1, -1), (-1, 0), (-1, 1), (0, -1), (...
2024-10-10
0
101
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页