結果
問題 |
No.428 小数から逃げる夢
|
ユーザー |
![]() |
提出日時 | 2016-10-02 23:21:24 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 364 bytes |
コンパイル時間 | 317 ms |
コンパイル使用メモリ | 21,760 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-21 13:35:28 |
合計ジャッジ時間 | 2,483 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 100 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:8:15: warning: format ‘%g’ expects argument of type ‘double’, but argument 2 has type ‘long double’ [-Wformat=] 8 | printf("%#gLf", answer); | ~~^ ~~~~~~ | | | | | long double | double | %#Lg main.c:6:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%Lf", &N); | ^~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(){ long double D = 0.1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991q; long double N; scanf("%Lf", &N); long double answer = D * N; printf("%#gLf", answer); return 0; }