結果
| 問題 |
No.784 「,(カンマ)」
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-07-29 00:50:26 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 313 bytes |
| コンパイル時間 | 2,084 ms |
| コンパイル使用メモリ | 195,956 KB |
| 最終ジャッジ日時 | 2025-01-07 09:52:57 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 10 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string s;
cin >> s;
string ans;
reverse(s.begin(), s.end());
for (int i = 0; i < s.size(); i++) {
if (i % 3 == 0) ans = "," + ans;
ans = s[i] + ans;
}
cout << ans << endl;
return 0;
}