結果
| 問題 | No.784 「,(カンマ)」 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-02-27 18:40:22 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 466µs | |
| コード長 | 374 bytes |
| 記録 | |
| コンパイル時間 | 343 ms |
| コンパイル使用メモリ | 73,088 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-27 15:47:27 |
| 合計ジャッジ時間 | 1,449 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
#include <iostream>
#include <string>
int main()
{
std::string in;
std::cin >> in;
int count = 0;
for(auto it = in.end() - 1; it != in.begin(); --it)
{
if(count == 2)
{
in.insert(it, ',');
}
count++;
count = count >= 3 ? 0 : count;
}
std::cout << in << std::endl;
return 0;
}