結果
| 問題 |
No.2224 UFO Game
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-04-28 13:26:55 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 539 bytes |
| コンパイル時間 | 2,574 ms |
| コンパイル使用メモリ | 166,028 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-17 14:01:29 |
| 合計ジャッジ時間 | 1,940 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 RE * 1 |
| other | WA * 1 RE * 10 |
ソースコード
#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;
}