結果
| 問題 | No.784 「,(カンマ)」 | 
| コンテスト | |
| ユーザー | 👑  tatyam | 
| 提出日時 | 2019-02-08 21:24:53 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 695 bytes | 
| コンパイル時間 | 1,676 ms | 
| コンパイル使用メモリ | 192,660 KB | 
| 最終ジャッジ日時 | 2025-01-06 20:52:15 | 
| ジャッジサーバーID (参考情報) | judge3 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 10 | 
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll=long;
using pll=pair<ll,ll>;
#define vec(type,name,...) vector<type>name(__VA_ARGS__)
#define each(i,a) for(auto&i:a)
#define name4(a,b,c,d,...) d
#define rep(...) name4(__VA_ARGS__,rep3,rep2,rep1)(__VA_ARGS__)
#define rep1(a) rep3(i,0,a)
#define rep2(i,a) rep3(i,0,a)
#define rep3(i,a,b) for(ll i=a;i<b;i++)
const ll LINF=0x1fffffffffffffff;
template <class T>bool update_min(T&a,const T&b){if(a>b){a=b;return 1;}return 0;}
template <class T>bool update_max(T&a,const T&b){if(a<b){a=b;return 1;}return 0;}
signed main(){
	string s;
	cin>>s;
	ll n=s.size();
	rep(n){
		cout<<s[i];
		if((n-i-1)%3==0&&(n-i-1)>0)cout<<',';
	}
	cout<<endl;
}
            
            
            
        