摘要: #include #include #include using namespace std; int main() { const int max = 1000000; char str[max]; char num[max / 10]; stringstream ss; int n, i, j; string ans = ""; queueq; cin.getline(num... 阅读全文
posted @ 2019-08-05 13:13 zhanghua-01 阅读(263) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; int main() { int i, j,n; string s1, s2,a1,a2; cin >> i >> j; cin >> s1 >> s2; a1 = s1[i-1]; a2 = s2[i-1]; for (n = i-1; n < j; n++) { a1 += s1[n]; a2 += s2[n... 阅读全文
posted @ 2019-08-05 13:12 zhanghua-01 阅读(249) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; int main() { char str[30]; cin.getline(str, 30); cout << str << endl; return 0; } 阅读全文
posted @ 2019-08-05 13:12 zhanghua-01 阅读(63) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; void is_HuiWenShu(int c) { int n = 0; int m = c; while (m != 0) { n = n * 10 + m%10; m = m / 10; } if (n == c) cout > a >> b; num = a + b; is_HuiWenShu(nu... 阅读全文
posted @ 2019-08-05 13:11 zhanghua-01 阅读(93) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; int main() { int i, len,n; string s; cin >>n>> s; len = s.length(); for (i = 0; i = 'A' && s[i] = 'a' && s[i] = 'A' && s[i] 'Z') { s[i] -= 26; } } el... 阅读全文
posted @ 2019-08-05 13:10 zhanghua-01 阅读(191) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; int main() { string s; cin >> s; vector v(52, 0); for (int i = 0; i = 'A' && s[i] = 'a' && s[i] = 26) { temp = i - 26 + 97; } else { temp = i + ... 阅读全文
posted @ 2019-08-05 13:09 zhanghua-01 阅读(93) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; int gcd(int a, int b) { if (b == 0) return a; else return gcd(b, a % b); } int main() { int a, b,i,j,k=0; cin >> a >> b; if ... 阅读全文
posted @ 2019-08-05 13:06 zhanghua-01 阅读(122) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; int main() { int r,n,ans=0; stacks; cin>>n>>r; while(n) { s.push(n%r); n/=r; } while(!s.empty()) { ans... 阅读全文
posted @ 2019-08-05 13:04 zhanghua-01 阅读(117) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; int main() { int r, n; stacks; cin >> n >> r; while (n) { s.push(n % r); n /= r; } while (!s.empty()) { switch (s.to... 阅读全文
posted @ 2019-08-05 13:02 zhanghua-01 阅读(253) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; int main() { string n; int m, len, i, ans = 0; cin >> n >> m; len = n.length(); for (i = 0; i < len; i++) { if (n[i] <= '9') ans = ans ... 阅读全文
posted @ 2019-08-05 12:59 zhanghua-01 阅读(370) 评论(0) 推荐(0) 编辑