結果
| 問題 |
No.3035 文字列のみの反転
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-04-10 02:02:58 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 340 bytes |
| コンパイル時間 | 686 ms |
| コンパイル使用メモリ | 71,888 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-04-10 02:03:00 |
| 合計ジャッジ時間 | 1,698 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 |
ソースコード
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main() {
string s;
cin >> s;
int i = 0;
while (i < s.size() && isalpha(s[i])) {
i++;
}
string a = s.substr(0, i);
string b = s.substr(i);
reverse(a.begin(), a.end());
cout << a + b << endl;
return 0;
}