結果

問題 No.2224 UFO Game
ユーザー trombiano1trombiano1
提出日時 2023-04-28 13:26:55
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 539 bytes
コンパイル時間 1,627 ms
コンパイル使用メモリ 168,028 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-28 19:01:35
合計ジャッジ時間 2,360 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 RE -
testcase_02 WA -
testcase_03 WA -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#ifdef DEBUG_
#include "../../../onlinejudge/dump.cpp"
#else
#define dump(...)
#endif

unsigned long long longpow(long long a, long long b) {
    unsigned long long res = 1;
    for (int i = 0; i < b; i++) {
        res *= a;
    }
    return res;
}

int main(void) {
    ios::sync_with_stdio(false);
    cin.tie(0);
    string s;
    cin >> s;
    if (s[0] != 'x') {
        return stoi(s);
    } else {
        return longpow(2, 31) - stoi(s.substr(1, (int) s.size()));
    }
    return 0;
}
0