#include <bits/stdc++.h> using namespace std; int main() { string s; cin>>s; reverse(s.begin(),s.end()); //先反转,从低位开始 string s1; int i,count=0; for(char c:s) { count++; i++; s1+=c; if(count==3&&i!=s.size()) //每3位一添加 { count=0; s1+=","; } } reverse(s1.begin(),s1.end()); //反转输出 cout<<s1<<endl; return 0; } // 64 位输出请用 printf("%lld")