結果

問題 No.46 はじめのn歩
ユーザー aaaaaaaa
提出日時 2018-12-18 20:52:32
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 222 bytes
コンパイル時間 1,180 ms
コンパイル使用メモリ 22,264 KB
実行使用メモリ 4,372 KB
最終ジャッジ日時 2023-10-25 23:43:02
合計ジャッジ時間 1,367 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
4,348 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 377 ms
4,348 KB
testcase_09 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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);
      |     ~~~~~^~~~~~~~~

ソースコード

diff #

#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;
}
0