上一页 1 ··· 8 9 10 11 12 13 下一页
摘要: 1002 写出这个数 (20分) [1002 写出这个数 (20分)](https://pintia.cn/problem-sets/994805260223102976/problems/994805324509200384) #include<iostream> #include<string> 阅读全文
posted @ 2020-06-09 18:00 chstor 阅读(113) 评论(0) 推荐(0)
摘要: 1021 个位数统计 (15分) #include<iostream> #include<string> #include<cstdio> using namespace std; int main(){ string s;cin>>s; int a[1005]={0}; for(int i=0;i 阅读全文
posted @ 2020-06-09 17:59 chstor 阅读(98) 评论(0) 推荐(0)
摘要: 1006 换个格式输出整数 (15分) #include<iostream> #include<string> #include<cstdio> using namespace std; int main(){ int n;cin>>n; string s=to_string(n); if(s.le 阅读全文
posted @ 2020-06-09 17:56 chstor 阅读(111) 评论(0) 推荐(0)
摘要: 1037 在霍格沃茨找零钱 (20分) 跟时间小时分钟题的进制转换大体一样,模拟一下 #include<iostream> #include<cstdio> const int Galleon=17*29; const int Sickle=29; using namespace std; int 阅读全文
posted @ 2020-06-09 09:24 chstor 阅读(109) 评论(0) 推荐(0)
摘要: 1022 D进制的A+B (20分) 这题是十进制转换为d进制的题 从后往前存入的 do{ z[num++]=n%d; n/=d; }while(n!=0); #include<iostream> using namespace std; int main(){ int a,b,d;cin>>a>> 阅读全文
posted @ 2020-06-09 09:23 chstor 阅读(180) 评论(0) 推荐(0)
摘要: 1027 打印沙漏 (20分) 注意输出的字符是自己输入的,不是固定的'*' 先求出多少层,然后到一定条件反转一下就行了 #include<iostream> using namespace std; int main(){ int n,m; string s; cin>>n>>s; int lev 阅读全文
posted @ 2020-06-08 11:04 chstor 阅读(118) 评论(0) 推荐(0)
摘要: 1036 跟奥巴马一起编程 (15分) 注意一下空格就行了 #include<iostream> #include<algorithm> using namespace std; int main(){ int n,m;string s; cin>>n>>s; if(n%2){ m=n/2+1; } 阅读全文
posted @ 2020-06-08 11:01 chstor 阅读(177) 评论(0) 推荐(0)
摘要: 1032 挖掘机技术哪家强 (20分) 从 1 开始连续编号 #include<iostream> #include<algorithm> const int maxn =100005; using namespace std; struct Node{ int id,grade=0; }stu[m 阅读全文
posted @ 2020-06-08 09:51 chstor 阅读(127) 评论(0) 推荐(0)
摘要: 用容器存数组简单一些,字符串string好些 一个坑点就是没有有效生日,只输出0 #include<iostream> #include<vector> #include<cstdio> #include<algorithm> using namespace std; struct Node{ st 阅读全文
posted @ 2020-06-08 09:45 chstor 阅读(136) 评论(0) 推荐(0)
摘要: 1004 成绩排名 (20分) 直接sort了,找最大最小值 #include<iostream> #include<algorithm> using namespace std; struct Node{ string name; string id; int grade; }; bool cmp 阅读全文
posted @ 2020-06-08 09:43 chstor 阅读(188) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 下一页