結果
| 問題 | 
                            No.791 うし数列
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2019-07-29 15:39:03 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 475 bytes | 
| コンパイル時間 | 628 ms | 
| コンパイル使用メモリ | 68,224 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-02 15:22:11 | 
| 合計ジャッジ時間 | 1,244 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | WA * 2 | 
| other | WA * 15 | 
ソースコード
#include <iostream>
#include <string> 
#include <algorithm>
using namespace std;
int main(void){
    // Your code here!
    string N;
    cin >> N;
    
    reverse(N.begin(),N.end());
    
    string S = "";
    for(int i = 0; i < N.size(); i++){
        S.push_back(N[i]);
        if(i%3 == 2 and i != N.size() - 1){
            S.push_back(',');
        }
    }
    
    for(auto itr = S.rbegin(); itr != S.rend(); itr++){
        cout << *itr;
    }
    cout << endl;
}