1.Atcoder
1.Strings with the Same Length
题意:
Given are strings s and t of length N each, both consisting of lowercase English letters.
Let us form a new string by alternating the characters of S and the characters of T, as follows: the first character of S, the first character of T, the second character of S, the second character of T, …, the N-th character of S, the N-th character of T. Print this new string.
输入:
Input is given from Standard Input in the following format:
N
S T
1≤N≤100
|S|=|T|=N
S and T are strings consisting of lowercase English letters.
输出:
Print the string formed.
样例输入1:
2
ip cc
样例输出1:
icpc
样例输入2:
8
hmhmnknk uuuuuuuu
样例输出2:
humuhumunukunuku
样例输入3:
5
aaaaa aaaaa
样例输出3:
aaaaaaaaaa
程序代码:
//就是字符交替出现
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
char a[100+5],b[100+5];
for(int i=0;i<n;i++){
cin>>a[i];
}
for(int i=0;i<n;i++){
cin>>b