結果

問題 No.379 五円硬貨
ユーザー Maeda
提出日時 2025-03-28 09:36:40
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 213 bytes
コンパイル時間 258 ms
コンパイル使用メモリ 26,112 KB
実行使用メモリ 7,324 KB
最終ジャッジ日時 2025-03-28 09:36:42
合計ジャッジ時間 1,184 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 16
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:15: warning: use of ‘ll’ length modifier with ‘e’ type character has either no effect or undefined behavior [-Wformat=]
    6 |     scanf("%lle %lle %lle",&n,&g,&v);
      |               ^
main.c:6:20: warning: use of ‘ll’ length modifier with ‘e’ type character has either no effect or undefined behavior [-Wformat=]
    6 |     scanf("%lle %lle %lle",&n,&g,&v);
      |                    ^
main.c:6:25: warning: use of ‘ll’ length modifier with ‘e’ type character has either no effect or undefined behavior [-Wformat=]
    6 |     scanf("%lle %lle %lle",&n,&g,&v);
      |                         ^
main.c:6:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |     scanf("%lle %lle %lle",&n,&g,&v);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>
#include <string.h>

void main(void){
    long double n,g,v;
    scanf("%lle %lle %lle",&n,&g,&v);
    long int coin = n/5;
    long double ans = coin*g/v;
    printf("%0.12f\n",(double)ans); 
}
0