結果

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

ソースコード

diff #

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	string s;cin>>s;
	int i=0;
	while(!(s[i]>='0'&&s[i]<='9'))i++;
	string t=s.substr(0,i);
	reverse(t.begin(),t.end());
	cout<<t<<s.substr(i)<<endl;
}
0