社区讨论
为啥只有50分???
P8706[蓝桥杯 2020 省 AB1] 解码参与者 4已保存回复 6
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 6 条
- 当前快照
- 1 份
- 快照标识符
- @m0c50o1w
- 此快照首次捕获于
- 2024/08/27 16:00 2 年前
- 此快照最后确认于
- 2025/11/04 22:17 4 个月前
CPP
#include<bits/stdc++.h>
#define ll long long
using namespace std;
string str,ans;
int main(){
cin>>str;
for(int i=0;i<=str.size();i++){
if(str[i]>='0'&&str[i]<='9') cout<<str[i];
else if(str[i]>'9'&&str[i+1]>'9') cout<<str[i];
else{
for(int j=1;j<=str[i+1]-48;j++) cout<<str[i];
i+=1;
}
}
return 0;
}
回复
共 6 条回复,欢迎继续交流。
正在加载回复...