結果

問題 No.3035 文字列のみの反転
ユーザー zawakasu
提出日時 2025-02-28 21:22:40
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 693 bytes
コンパイル時間 777 ms
コンパイル使用メモリ 106,276 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2025-02-28 21:22:47
合計ジャッジ時間 1,393 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <iomanip>
#include <cassert>
#include <vector>
#include <algorithm>
#include <utility>
#include <numeric>
// #include "Src/Utility/BinarySearch.hpp"
// #include "Src/Sequence/CompressedSequence.hpp"
// #include "Src/Sequence/RunLengthEncoding.hpp"
// using namespace zawa;
// #include "atcoder/modint"
// using mint = atcoder::modint998244353;
std::string S;
int main() {
    std::cin.tie(nullptr);
    std::ios::sync_with_stdio(false);
    std::cout.tie(nullptr);
    std::cin >> S;
    for (int i = 0 ; i < (int)S.size() ; i++) if ('0' <= S[i] and S[i] <= '9') {
        std::reverse(S.begin(), S.begin() + i);
        break;
    }
    std::cout << S << '\n';
}
0