結果

問題 No.379 五円硬貨
ユーザー toto
提出日時 2025-04-01 16:19:35
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 209 bytes
コンパイル時間 337 ms
コンパイル使用メモリ 28,032 KB
実行使用メモリ 7,328 KB
最終ジャッジ日時 2025-04-01 16:19:37
合計ジャッジ時間 1,421 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 10 WA * 6
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:5:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |     scanf("%ld%ld%ld",&yen,&gram,&volume);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(){
    long yen, gram, volume;
    scanf("%ld%ld%ld",&yen,&gram,&volume);
    
    long leave = yen / 5;
    
    double ans = (leave * gram) / volume;

    printf("%.15f",ans);

}
0