結果
問題 |
No.46 はじめのn歩
|
ユーザー |
![]() |
提出日時 | 2018-12-18 20:52:32 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 222 bytes |
コンパイル時間 | 249 ms |
コンパイル使用メモリ | 22,528 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-25 07:47:13 |
合計ジャッジ時間 | 996 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 WA * 8 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:7:13: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘long long int*’ [-Wformat=] 7 | scanf("%d",&a); | ~^ ~~ | | | | | long long int* | int* | %lld main.cpp:8:13: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘long long int*’ [-Wformat=] 8 | scanf("%d",&b); | ~^ ~~ | | | | | long long int* | int* | %lld main.cpp:7:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%d",&a); | ~~~~~^~~~~~~~~ main.cpp:8:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%d",&b); | ~~~~~^~~~~~~~~
ソースコード
#include<stdio.h> int main(){ long long int a, b; int i = 0; int j = 0; scanf("%d",&a); scanf("%d",&b); while(j < b){ j = i * a; i = i + 1; } printf("%d",j); return 0; }