結果
| 問題 |
No.784 「,(カンマ)」
|
| コンテスト | |
| ユーザー |
trineutron
|
| 提出日時 | 2020-04-09 16:55:43 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 261 bytes |
| コンパイル時間 | 2,938 ms |
| コンパイル使用メモリ | 193,736 KB |
| 最終ジャッジ日時 | 2025-01-09 15:29:52 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 7 WA * 3 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
string n;
cin >> n;
int d = n.size(), r = (d - 1) % 3 + 1;
cout << n.substr(0, r);
for (int i = r; i < d; i += 3) {
cout << "," << n.substr(r, 3);
}
cout << endl;
}
trineutron