結果
問題 | No.598 オーバーフローファンタジー |
ユーザー |
![]() |
提出日時 | 2017-12-05 03:40:48 |
言語 | C++11 (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 319 bytes |
コンパイル時間 | 241 ms |
コンパイル使用メモリ | 22,400 KB |
実行使用メモリ | 15,184 KB |
最終ジャッジ日時 | 2024-11-28 15:17:11 |
合計ジャッジ時間 | 97,368 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | TLE * 3 |
other | TLE * 28 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: 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", &x); | ~~~~~^~~~~~~~~~~~ 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", &y); | ~~~~~^~~~~~~~~~~~ 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", &z); | ~~~~~^~~~~~~~~~~~ main.cpp:13:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 13 | scanf("%d\n", &t); | ~~~~~^~~~~~~~~~~~
ソースコード
#include <stdio.h> int main() { int x,y,z,t; int i = 1; int sum = 0; int dam = 0; scanf("%d\n", &x); scanf("%d\n", &y); scanf("%d\n", &z); scanf("%d\n", &t); sum = x; dam = z - t; do{ sum *= x; }while(i < x); i = 0; while((y != 0) || (y > sum)){ y += dam; i++; } printf("%d", i); return (0); }