結果

問題 No.835 ジュース
ユーザー zGb6E2aZRz6qwu9zGb6E2aZRz6qwu9
提出日時 2019-06-20 15:45:36
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 189 bytes
コンパイル時間 458 ms
コンパイル使用メモリ 55,284 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-05-09 23:25:35
合計ジャッジ時間 998 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:14: warning: format ‘%lf’ expects argument of type ‘double*’, but argument 2 has type ‘long double*’ [-Wformat=]
    6 |     scanf("%lf",&a);
      |            ~~^  ~~
      |              |  |
      |              |  long double*
      |              double*
      |            %Lf
main.cpp:8:15: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘long long int’ [-Wformat=]
    8 |     printf("%ld\n",ans);
      |             ~~^    ~~~
      |               |    |
      |               |    long long int
      |               long int
      |             %lld
main.cpp:6:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |     scanf("%lf",&a);
      |     ~~~~~^~~~~~~~~~

ソースコード

diff #

#include<stdio.h>
#include<iostream>
using namespace std;
int main(void){
    long double M,a;
    scanf("%lf",&a);
    long long int ans=a*1.5;
    printf("%ld\n",ans);
    return 0;
}
   
0