結果
問題 |
No.598 オーバーフローファンタジー
|
ユーザー |
![]() |
提出日時 | 2017-12-05 03:43:54 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 275 bytes |
コンパイル時間 | 197 ms |
コンパイル使用メモリ | 22,528 KB |
実行使用メモリ | 15,040 KB |
最終ジャッジ日時 | 2024-11-28 15:18:58 |
合計ジャッジ時間 | 65,543 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 TLE * 2 |
other | AC * 1 WA * 11 TLE * 16 |
コンパイルメッセージ
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("%d\n", &x); | ~~~~~^~~~~~~~~~~~ main.cpp:10:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%d\n", &y); | ~~~~~^~~~~~~~~~~~ main.cpp:11:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 11 | scanf("%d\n", &z); | ~~~~~^~~~~~~~~~~~ main.cpp:12:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 12 | scanf("%d\n", &t); | ~~~~~^~~~~~~~~~~~
ソースコード
#include <stdio.h> int main() { int x,y,z,t; int i = 1; int dam = 0; scanf("%d\n", &x); scanf("%d\n", &y); scanf("%d\n", &z); scanf("%d\n", &t); x = (2 << x); dam = z - t; i = 0; while((y != 0) || (y > x)){ y += dam; i++; } printf("%d", i); return (0); }