自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 PAT (Advanced Level) Practice 1005 Spell It Right (20)

本题难度不大,仅是string与long转换 #include<iostream> #include <sstream> #include<string> #include <stdlib.h> using namespace std; long add(string &str) { long res=0; for (int i = ...

2018-08-02 00:29:10 146

原创 PAT (Advanced Level) Practice 1035 Password (20)

本题为字符串替换 #include<iostream> #include<string> using namespace std; int check(string& str) { for (int i = 0; i < str.length(); i++) { if (str.find("0")==-1 && str.find("O...

2018-08-01 23:49:05 98

原创 PAT (Advanced Level) Practice 1027 Colors in Mars (20)

实质为进制转换 #include<iostream> #include<string> using namespace std; string cha(int num) { char hi='0', lo='0'; if (num <=12) { if (num <= 9) { lo = num+'0'; } else if (num ...

2018-08-01 22:35:26 91

原创 PAT (Advanced Level) Practice 1001 A+B Format (20) C++

本题主要考察边界条件判断,数字取模取余运算。 #include <iostream> #include <cstdio> #include <string> #include<iomanip> using namespace std; int main(void) { long n,m; cin >> n >> m; ...

2018-07-20 15:04:35 147

原创 PAT (Advanced Level) Practice 1006 Sign In and Sign Out (25) C++

此程序主要使用到strcmp(s1,s2)与strcpy(s1,s2)两个函数:     strcmp(s1,s2):比较两个字符串大小;s1>s2返回正整数,s1<s2返回负整数,s1=s2返回0.     strcpy(s1,s2):s2赋给s1。 #include <iostream> #include <cstdio> #include <...

2018-07-20 13:53:07 184

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除