6 条题解
-
0
#include<bits/stdc++.h> #define ll long long using namespace std; const int N=1e6+10; const int INF=0x3f3f3f3f; inline int read(){int x=0,f=1;char ch=getchar();while (ch<'0'||ch>'9'){if (ch=='-') f=-1;ch=getchar();}while (ch>='0'&&ch<='9'){x=x*10+ch-48;ch=getchar();}return x*f;} string s; int main(){ //freopen(".in","r",stdin); //freopen(".out","w",stdout); cin>>s; if(s.size()%2==0)for(int i=0;i<s.size();i+=2)cout<<s[i]<<s[i+1]<<" "; else{ cout<<s[0]<<" "; for(int i=1;i<s.size();i+=2)cout<<s[i]<<s[i+1]<<" "; } }
信息
- ID
- 944
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 5
- 标签
- 递交数
- 459
- 已通过
- 177
- 上传者