While1729
While1729
全部文章
分类
归档
标签
去牛客网
登录
/
注册
consistant 665
believe
全部文章
(共42篇)
题解 | 约瑟夫环 链表
#include <stdio.h> #include<stdlib.h> typedef struct Node{ int n; struct Node*next;} Node; int main() { int a, b,c; wh...
2025-11-23
0
21
题解 | A-B≠C 题目最长六位,转换为长整型避免浮点误差
#include <stdio.h> int main() { double a, b,c; while (scanf("%lf %lf %lf", &a, &b,&c) != EOF) { // 注意 while 处理多个 ...
2025-11-22
0
23
题解 | 学生基本信息输入输出 极简
info=input().split(";") number,src=info[0],[round(float(i)+0.0001,2)for i in info[1].split(",")] print("The each subject sco...
2025-11-22
0
25
题解 | 最大最小值 max(x,y)=(x+y+|x-y|)/2
#include <stdio.h> int abs(int x){ return x<0?-x:x; }int max(int x,int y){ return(x+y+abs(x-y))/2; }int min(int x,int y){ return(...
2025-11-22
0
28
题解 | 平方根 n/2+x/n趋于sqrt(x) 巴比伦法是最古老的平方根迭代算法
#include <stdio.h> int sqrt(int n){ if (n == 0) return 0; if (n == 1) return 1; int x=n; int x_b; do{ x_b=x; ...
2025-11-22
0
33
题解 | 记数问题
import sys n,x=map(int,input().split()) y=0 for m in range(1,n+1): y+=str(m).count(str(x)) print(y)
2025-11-22
0
21
题解 | 小红喜欢1
#include <stdio.h> int main() { int a[5]; int *p=a; while (scanf("%d", p) != EOF) p++;// 注意 while 处理多个 case // 6...
2025-11-22
0
23
题解 | 水仙花数 py测区域间
import sys for line in sys.stdin: m,n=map(int,line.strip().split()) a=[] for b in range(m,n+1): hundreds=b//100 tens=(b//...
2025-11-22
0
21
题解 | 添加逗号 不用
#include<stdio.h> int main(){ char a[11]; int len=0; char ch; while(1){ ch=getchar(); if(ch=='\n') break; a[len++]=ch; }...
2025-11-22
0
20
题解 | 排序危机 重复内容挺多
#include <stdio.h> int main() { int n,m=0; char s[100001],s2[100001]; while (scanf("%d%s", &n, s) != EOF) { // 注意 whi...
2025-11-22
0
22
首页
上一页
1
2
3
4
5
下一页
末页