牛客462061271号
牛客462061271号
全部文章
分类
归档
标签
去牛客网
登录
/
注册
牛客462061271号的博客
全部文章
(共9篇)
题解 | #扑克牌大小#
#include <iostream> #include<string> #include<algorithm> using namespace std; string Res(const string& s) { if(s.find("...
2023-10-29
0
242
题解 | #杨辉三角的变形#
#include <iostream> using namespace std; int Res(int n) { if(n==1||n==2) return -1; if(n%2!=0) return 2; if(n%4==0) ...
2023-10-29
0
169
题解 | #把字符串转换成整数#
class Solution { public: int StrToInt(string str) { int sum=0; int flag=1; if(str.size()==0) return 0; ...
2023-10-08
0
200
题解 | #字符串最后一个单词的长度#
#include <iostream> #include<string> using namespace std; int main() { string s; getline(cin,s); int i=s.rfind(' '); cout...
2023-09-05
0
235
题解 | #获得月份天数#
#include <stdio.h> int main() { int year = 0; int month = 0; while(scanf("%d %d", &year, &month)!=EOF) { switch (month) { case 1: c...
2023-04-05
0
164
题解 | #获得月份天数#
#include <stdio.h> int main() { int year = 0; int month = 0; while(scanf("%d %d", &year, &month)!=EOF) { switch (month) { case 1: c...
2023-04-05
0
204
题解 | #删除公共字符#
#include <stdio.h> int Is_exist(char* arr, char ch) { while (*arr) { if (*arr == ch) { return 1; } arr++...
2023-04-04
0
250
题解 | #添加逗号#
int main() { int arr[10] = { 0 }; long num = 0; int i = 0; int j = 0; int count = 0; int m = 0; scanf("%d", &num); if...
2023-04-04
0
234
题解 | #计算日期到天数转换#
#include <stdio.h> int main() { int year=0; int month=0; int day=0; int sum=0; scanf("%d %d %d",&year,&month,&day); sw...
2023-03-31
0
251