虚心的存钱罐
虚心的存钱罐
全部文章
分类
题解(58)
归档
标签
去牛客网
登录
/
注册
虚心的存钱罐的博客
全部文章
(共58篇)
题解 | #百钱买百鸡问题# C++
#include<bits/stdc++.h> using namespace std; int main() { int n; while(cin>>n) { int a,b,c; for(int i=0;i<2...
2021-07-10
4
475
题解 | #配置文件恢复# C++好理解
#include<bits/stdc++.h> #include<string.h> using namespace std; int main() { string tmp; vector<string> cmd; while(cin&g...
2021-07-10
3
602
题解 | #放苹果# 一楼牛逼,C++实现
#include<bits/stdc++.h> using namespace std; int f(int m,int n) { if(m==0||m==1||n==1) return 1; if(n>m) return f(m,m); ...
2021-07-10
1
555
题解 | #完全数计算# C++解法,易读
#include<bits/stdc++.h> using namespace std; int main() { int n,tmp,num; while(cin>>n) { int a=n,b; while(a) ...
2021-07-09
1
511
题解 | #杨辉三角的变形#不取巧C++解法
#include<bits/stdc++.h> using namespace std; int main() { int n; while(cin>>n) { vector<vector<int>> v(n,v...
2021-07-09
3
568
题解 | #统计大写字母个数#C++解法
C++解法 #include<bits/stdc++.h> using namespace std; int main() { string str; while(getline(cin,str)) { int num=0; for...
2021-07-09
1
489
题解 | #等差数列#
直接用数学公式 an=a1+(n-1)*d sn=(a1+an)*n/2 #include<bits/stdc++.h> using namespace std; int main() { int a1=2,d=3; int n,an,sum; while(cin...
2021-07-09
1
513
题解 | #查找输入整数二进制中1的个数#
C++实现 #include<bits/stdc++.h> using namespace std; int main() { int n,num; while(cin>>n) { while(n) { ...
2021-07-09
1
474
首页
上一页
1
2
3
4
5
6
下一页
末页