結果
| 問題 | No.784 「,(カンマ)」 | 
| コンテスト | |
| ユーザー |  ui_mtc | 
| 提出日時 | 2020-01-26 18:34:09 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 299 bytes | 
| コンパイル時間 | 1,724 ms | 
| コンパイル使用メモリ | 169,892 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-09-14 11:12:31 | 
| 合計ジャッジ時間 | 2,664 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 10 | 
ソースコード
#include <bits/stdc++.h>
#define int long long 
using namespace std;
signed main() {
string S;
cin >> S;
reverse(S.begin(), S.end());
string ans = "";
for( int i = 0; i < S.size(); i++ ){
if( i % 3 == 0 && i != 0 ) ans = "," + ans;
ans = S.at(i) + ans;
}
cout << ans << endl;
}
  
  
  
  
            
            
            
        