結果

問題 No.784 「,(カンマ)」
ユーザー aa
提出日時 2020-04-09 17:09:08
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 535 bytes
コンパイル時間 1,725 ms
コンパイル使用メモリ 166,468 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-13 14:00:19
合計ジャッジ時間 2,252 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 5 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

/**
 *  author:   TakeruOkuyama
 *  created:  2020-04-09 14:53:46
**/
#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main(){
    string N;
    cin >> N;
    rep(i, N.size()){
        if(i + 1 != N.size()){
            if((i + 1) % 3 == 0){
                cout << N[i] << ","; 
            }else{
                cout << N[i];
            }
        }else{
            cout << N[i];
        }
    }
    cout << endl;
return 0;}

/**
**/ 
0