結果
問題 | No.2224 UFO Game |
ユーザー |
|
提出日時 | 2023-02-25 00:45:20 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 1,346 bytes |
コンパイル時間 | 5,291 ms |
コンパイル使用メモリ | 311,044 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-13 06:28:49 |
合計ジャッジ時間 | 5,838 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
#include <bits/stdc++.h>#include <atcoder/all>#define rep(i, n) for (int i = 0; i < (int)(n); i++)#define rrep(i, n, m) for (int i = (int)(n); i > (int)(m); i--)#define rep1(i, n, m) for (int i = (int)(n); i < (int)(m); i++)#define all(x) (x).begin(), (x).end()#define rall(x) (x).rbegin(), (x).rend() using namespace atcoder;using ll = long long;const ll MOD1 = 1000000007LL;const ll MOD2 = 998244353LL;using namespace std;using namespace atcoder;const vector<pair<int, int>> dpos4 = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}};// const vector<pair<int, int>> dpos8 = {{-1, -1}, {-1, 0}, {-1, 1}, {0, -1}, {0, 1}, {1, -1}, {1, 0}, {1, 1}};template <typename T>bool chmax(T &a, const T &b) {if (a < b) {a = b; // aをbで更新return true;}return false;}template <typename T>bool chmin(T &a, const T &b) {if (a > b) {a = b; // aをbで更新return true;}return false;}template<typename T>T pow(T a, ll b){if(b == 0) return 1;if(b % 2 == 0) return pow(a / 2, b / 2);return a * pow(a, b - 1);}int main() {string s;cin >> s;ll ans = 0;if(s[0] == 'x'){s = s.substr(1, s.size() - 1);ll t = atoll(s.c_str());ans = (1LL<<32) - t;}else ans = atoll(s.c_str());cout << ans << endl;return 0;}