結果
| 問題 |
No.598 オーバーフローファンタジー
|
| コンテスト | |
| ユーザー |
ECHO_1221
|
| 提出日時 | 2017-12-05 03:32:01 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 282 bytes |
| コンパイル時間 | 275 ms |
| コンパイル使用メモリ | 22,016 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-28 15:13:56 |
| 合計ジャッジ時間 | 1,346 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 28 |
コンパイルメッセージ
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 sum = 0;
scanf("%d\n", &x);
scanf("%d\n", &y);
scanf("%d\n", &z);
scanf("%d\n", &t);
sum = x;
while(i < x - 1){
sum *= x;
}
i = 0;
while((y != 0) || (y > sum)){
y -= z;
y += t;
i++;
}
return (0);
}
ECHO_1221