結果
| 問題 |
No.2224 UFO Game
|
| コンテスト | |
| ユーザー |
warm4C0
|
| 提出日時 | 2023-05-07 20:36:23 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 266 bytes |
| コンパイル時間 | 1,095 ms |
| コンパイル使用メモリ | 156,904 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-24 19:39:35 |
| 合計ジャッジ時間 | 1,778 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:9:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%s", s);
| ~~~~~^~~~~~~~~
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
char s[256];
scanf("%s", s);
ll y = 0;
if (s[0] == 'x') {
sscanf(s, "x%lld", &y);
y = (1LL<<32)-y;
} else {
sscanf(s, "%lld", &y);
}
printf("%lld\n", y);
return 0;
}
warm4C0