4thirteen2one
4thirteen2one
全部文章
分类
题解(37)
归档
标签
去牛客网
登录
/
注册
4thirteen2one的博客
TA的专栏
1篇文章
0人订阅
我的刷题记录
1篇文章
353人学习
全部文章
(共57篇)
题解 | #NC37 合并区间#
# class Interval: # def __init__(self, a=0, b=0): # self.start = a # self.end = b # # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # ...
Python3
2022-07-10
2
1379
题解 | #NC17 最长回文子串#
Python 版本 暴力遍历 class Solution: def getLongestPalindrome(self , A: str) -> int: for i in range(len(A), 0, -1): # 从大到小控制回文长度 ...
Python3
2022-07-07
1
750
题解 | #HJ80 整型数组合并#
#include <stdio.h> #include <stdlib.h> #include <string.h> int cmpfunc(const void* a, const void* b) { return (*(int*)a - *(int*...
C
2022-06-19
0
333
题解 | #HJ84 统计大写字母个数#
C语言版本 #include <stdio.h> int main() { char s[251]; scanf("%[^\n]", s); int count = 0; for (int i = 0; i < strlen(s); i++) { ...
C
Python3
2022-06-19
0
536
题解 | #HJ94 记票统计#
while True: try: n = int(input()) candidates = input().split() m = int(input()) votes = input().split() ...
Python3
2022-06-19
0
388
题解 | #HJ81 字符串字符匹配#
C语言版本 #include <stdio.h> #include <stdbool.h> int main() { char S[201]; char T[201]; scanf("%s", S); scanf("%s", T); ...
C
Python3
2022-06-19
0
479
题解 | #HJ105 记负均正II#
#include <stdio.h> int main() { int num; int negativeCount = 0, nonNegativeSum = 0, nonNegativeCount = 0; double nonNegativeMean =...
C
2022-06-19
0
358
题解 | #HJ76 尼科彻斯定理#
while True: try: m = int(input()) odds = list(range(m * m - (m - 1), m * m + m, 2)) print('+'.join(map(str, odds))) ex...
Python3
数学
2022-06-19
0
392
题解 | #HJ86 求最大连续bit数#
C语言版本 #include <stdio.h> int main() { int n, rangeMax, rangeCur; while(scanf("%d", &n) != EOF) { rangeMax = 0, rangeCur = 0...
C
Python3
2022-06-19
0
450
题解 | #HJ37 统计每个月兔子的总数#
递推 while True: try: n = int(input()) total = [] sum1 = 1 # 一个月兔子个数 sum2 = 0 # 两个月兔子个数 sum3 = 0 # 三个月以及三个月以...
Python3
2022-06-19
5
1068
首页
上一页
1
2
3
4
5
6
下一页
末页