結果
問題 | No.2224 UFO Game |
ユーザー |
|
提出日時 | 2023-03-03 20:17:41 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 486 bytes |
コンパイル時間 | 1,782 ms |
コンパイル使用メモリ | 166,828 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-17 22:12:58 |
合計ジャッジ時間 | 1,810 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
コンパイルメッセージ
main.cpp:19:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 19 | main(){ | ^~~~
ソースコード
#include <bits/stdc++.h>#define pb push_back#define pii pair<int,int>#define sc second#define all(s) s.begin(),s.end()#define fr first#define int long longusing namespace std;const int N = 100012;int fun(string s){int ans = 0;while (!s.empty()){ans *= 10;ans += s[0]-'0';s.erase(s.begin());}return ans;}main(){string s;cin>>s;int ans = 0;if (s[0] == 'x'){s.erase(s.begin());ans = 4294967296-fun(s);}elseans = fun(s);cout <<ans;}