結果
問題 |
No.784 「,(カンマ)」
|
ユーザー |
![]() |
提出日時 | 2019-08-09 04:54:55 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 313 bytes |
コンパイル時間 | 537 ms |
コンパイル使用メモリ | 117,760 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-30 14:28:12 |
合計ジャッジ時間 | 1,095 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
#include <iostream> #include <string> using namespace std; int main(){ string str; cin >> str; string ans = ""; for(int i = 0; i < str.size(); i++){ if(i && i % 3 == 0){ ans = "," + ans; } ans = str[str.size() - i - 1] + ans; } cout << ans << "\n"; }