奋斗中的小美
奋斗中的小美
全部文章
分类
归档
标签
去牛客网
登录
/
注册
奋斗中的小美的博客
TA的专栏
53篇文章
0人订阅
计算机复试机试(王道版)
53篇文章
112人学习
全部文章
(共43篇)
题解 | 浮点数加法
来自专栏
思路:1.分别对其小数部分和整数部分,因为补0位置不同,所以分别对齐(注意对齐整数部分时小数点位置会变化)2.小数部分加法和整数部分加法一样,用一个函数实现(注意跳过小数点)3.最后检查结果进位ps:如果题目还要求去掉小数点后的无效0://如果末尾是0或.,删除 while (str1...
2026-01-29
0
27
题解 | skew数
//简单题不过要小心,字符串的下标是从左到右的,第K位是从右到左数的 #include<stdio.h> #include<string> #include<iostream> #include<cmath> using namespace std...
2026-01-29
0
28
题解 | 单词替换
//直接使用find()的话不是单词也可能匹配到 //手动给a,b加空格 //因为a可能在开头和结尾也匹配到,也给原字符串前后加上空格 //最后截掉头尾输出子串 #include<stdio.h> #include<string> #include <iostream&...
2026-01-28
0
27
题解 | 日期类
来自专栏
#include<stdio.h> using namespace std; void nextday(int& year, int& month, int& day) { int dayofmonth[] = { 0, 31, 28, 31, 30, ...
2026-01-27
0
24
题解 | Day of Week
来自专栏
#include<stdio.h> #include<string.h> using namespace std; //首先要算出距离1年1月1日已经过了几天,再模7得到是星期几 //计算下一天的日期函数 void nextday(int& year, int&am...
2026-01-27
0
19
题解 | 日期累加
来自专栏
#include<stdio.h> using namespace std; void nextday(int& year, int& month, int& day) { int dayofmonth[] = { 0,31,28,31,30,31,30,31...
2026-01-27
0
24
题解 | 日期差值
来自专栏
#include<stdio.h> using namespace std; void nextday(int& year, int& month, int& day) { int dayofmonth[] = { 0, 31, 28, 31, 30, ...
2026-01-27
0
17
题解 | 打印日期
来自专栏
#include<stdio.h> using namespace std; void nextday(int& year, int& month, int& day) { int dayofmonth[] = {0,31,28,31,30,31,30,31,...
2026-01-27
0
17
题解 | 今年的第几天?
来自专栏
#include<stdio.h> using namespace std; void nextday(int& year, int& month, int& day) { int dayofmonth[] = {0,31,28,31,30,31,30,31,...
2026-01-27
0
20
题解 | Old Bill
来自专栏
#include<stdio.h> using namespace std; int main() { int n; int x, y, z; int sum; int max = 0; //scanf("%d", &...
2026-01-27
0
18
首页
上一页
1
2
3
4
5
下一页
末页