結果
| 問題 |
No.784 「,(カンマ)」
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-03-13 23:41:53 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 274 bytes |
| コンパイル時間 | 680 ms |
| コンパイル使用メモリ | 73,220 KB |
| 最終ジャッジ日時 | 2025-01-06 22:06:56 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#define int long long
using namespace std;
signed main() {
string s; cin >> s;
for (int i = 0; i < s.size(); i++) {
if (i&&(s.size() - i) % 3 == 0)cout << ',';
cout << s[i];
}cout << endl;
}