結果
問題 |
No.2314 Backflip
|
ユーザー |
![]() |
提出日時 | 2023-07-24 21:10:47 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 346 bytes |
コンパイル時間 | 672 ms |
コンパイル使用メモリ | 70,140 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-01 16:13:34 |
合計ジャッジ時間 | 1,122 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 8 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ // input string S; cin >> S; string rev = S; reverse(rev.begin(),rev.end()); if(rev[0]=='0'){ rev[0] = '1'; } else if (rev[0] == '1'){ rev[0] = '0'; } reverse(rev.begin(),rev.end()); cout << rev << endl; // output }