結果
| 問題 |
No.3035 文字列のみの反転
|
| コンテスト | |
| ユーザー |
Ponzu
|
| 提出日時 | 2025-02-28 21:23:54 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 315 bytes |
| コンパイル時間 | 982 ms |
| コンパイル使用メモリ | 101,036 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2025-02-28 21:23:57 |
| 合計ジャッジ時間 | 1,602 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 |
ソースコード
#include<iostream>
#include<vector>
#include<utility>
#include<algorithm>
using namespace std;
int main(){
string s;
cin >> s;
string a = "";
string b = "";
for(char c : s)
{
if(isdigit(c))
{
a.push_back(c);
} else
{
b.push_back(c);
}
}
reverse(begin(b),end(b));
cout << b + a << endl;
}
Ponzu