結果
問題 | No.784 「,(カンマ)」 |
ユーザー |
![]() |
提出日時 | 2019-03-31 19:40:26 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 344 bytes |
コンパイル時間 | 478 ms |
コンパイル使用メモリ | 58,020 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-22 06:13:54 |
合計ジャッジ時間 | 1,252 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
#include <fstream> #include <iostream> #include <string> int main() { //std::ifstream inf("Text.txt"); std::cin.rdbuf(inf.rdbuf()); std::string N; std::cin >> N; unsigned int c = (N.length() - 1) / 3; for (unsigned int i = 1; i <= c; i++) { N.insert(N.end() - i * 3 - (i - 1), ','); } std::cout << N << std::endl; return 0; }