牛客7777779号
牛客7777779号
全部文章
分类
归档
标签
去牛客网
登录
/
注册
牛客7777779号的博客
全部文章
(共86篇)
题解 | #Hello World for U#
注意区分str.size()是否是3的倍数 #include <iostream> using namespace std; int main(){ string str; while (cin >> str){ int temp; if (str.size()...
2023-03-16
0
165
题解 | #Old Bill#
输出时注意,最高价格不为0时,才输出淡出数字位,否则只输出最高价格0。 #include <iostream> using namespace std; int main(){ int n;//火鸡数目 while (cin >>n){ int x,y,z; c...
2023-03-16
0
247
题解 | #Sum of Factorials#
#include <iostream> using namespace std; int main(){ int n,a[11]; //数组存n! a[0] = 1; for (int i =1; i <= 10; i++){//计算n! a[i] = a[i-1]*i;...
2023-03-16
0
222
题解 | #WERTYU#
不需要上一行的键盘输入,即一个键可以输入两种字符时,只需要普通输入的字符就好,不需要shift输入。暴力解:把键盘存成一个数组;判断当前字符是否是空格,不是则查询数组,并输出数组中该字符的上一个单元的字符;是空格,则输出 #include <iostream> using namespa...
2023-03-16
0
279
题解 | #日期差值#
注意对于闰年的判断。虽然不知道测试用例里面有没有。 #include <iostream> #include <cstring> #include <algorithm> #include <math.h> #include <stdlib.h...
2023-03-12
0
175
题解 | #A+B for Matrices#
#include <iostream> #include <cstring> #include <algorithm> #include <math.h> #include <stdlib.h> using namespace std; ...
2023-03-10
0
237
题解 | #A + B#
思路:读入字符串,分别求出aa和bb两个加数;使用一个temp字符串,读取每一个英文单词,在number函数中,将temp转成相应的数字,返回值为该数字aa求法:在a[i] != '+' 之前的每一个英文单词都依次存入temp,转成数字后,"存入"aa;bb同理。 #include <iost...
2023-03-10
0
243
题解 | #A+B#
测试用例位数比较低,可以直接转成int型进行计算。 #include <iostream> #include <cstring> #include <algorithm> #include <math.h> #include <string.h...
2023-03-09
0
251
题解 | #Biorhythms#
#include <iostream> #include <cstring> #include <algorithm> #include <math.h> #include <string.h> #include <stdlib....
2023-03-06
0
212
题解 | #密码翻译#
#include <stdio.h> #include <string.h> #include <math.h> #include <string.h> #include <stdlib.h> #define MAX 81 int m...
2023-03-05
0
178
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页