题解 | 添加逗号
添加逗号
https://www.nowcoder.com/practice/f51c317e745649c0900996fd3f683aed
#include<bits/stdc++.h>
using namespace std;
string n;
int main(){
cin>>n;
int p=n.size();
while(p>3){
n.insert(p-3,",");
p=p-3;
}
cout<<n;
return 0;
}
查看8道真题和解析
OPPO公司福利 1229人发布