結果

問題 No.2314 Backflip
ユーザー unibop
提出日時 2023-05-26 22:44:32
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 63 ms / 2,000 ms
コード長 480 bytes
コンパイル時間 3,836 ms
コンパイル使用メモリ 170,032 KB
最終ジャッジ日時 2025-02-13 07:49:49
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <iomanip>
#include <stack>
#include <queue>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <deque>
#include <set>
#include <map>
#include <bitset>
#include <atcoder/all>
#define rep(i,n) for(int i = 0; i < n; i++)

using namespace std;
using namespace atcoder;
using ll = long long;

int main() {
	string s;
	cin >> s;
	
	int l = s.size() - 1;
	if (s[l] == '1') s[l] = '0';
	else s[l] = '1';

	cout << s << endl;
}
0