結果
| 問題 | No.784 「,(カンマ)」 |
| コンテスト | |
| ユーザー |
hiyori
|
| 提出日時 | 2019-02-10 16:35:47 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 315 bytes |
| コンパイル時間 | 579 ms |
| コンパイル使用メモリ | 67,424 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-06 12:20:30 |
| 合計ジャッジ時間 | 1,277 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 7 WA * 3 |
ソースコード
#include<iostream>
#include<string>
using namespace std;
int main()
{
string str, new_str="";
cin>>str;
int cnt=0;
for(int i=str.length()-1; i>=0; i--){
new_str = str[i]+new_str;
cnt++;
if(cnt%3==0){ new_str = ','+new_str; }
}
cout<<new_str<<endl;;
return 0;
}
hiyori