結果

問題 No.3035 文字列のみの反転
ユーザー tominn
提出日時 2025-04-01 22:52:44
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 299 bytes
コンパイル時間 2,961 ms
コンパイル使用メモリ 273,704 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2025-04-01 22:52:49
合計ジャッジ時間 3,735 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main() {
    string s;
    cin >> s;

    int n = (int)s.size();
    for (int i = 0; i < n; i++) {
        if (isdigit(s[i])) {
            reverse(s.begin(), s.begin() + i);
            break;
        }
    }
    cout << s << endl;
    return 0;
}
0