結果
| 問題 |
No.379 五円硬貨
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-06-29 15:58:50 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 206 bytes |
| コンパイル時間 | 88 ms |
| コンパイル使用メモリ | 21,120 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-11 23:04:12 |
| 合計ジャッジ時間 | 812 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | AC * 4 WA * 12 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:13:18: warning: format ‘%f’ expects argument of type ‘double’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
13 | printf("%f\n", ((yen/COIN)*mg)/vol);
| ~^ ~~~~~~~~~~~~~~~~~~~
| | |
| double long unsigned int
| %ld
main.c:11:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
11 | scanf("%lu %lu %lu", ¥, &mg, &vol);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
#define COIN 5
int main(void)
{
unsigned long yen;
unsigned long mg;
unsigned long vol;
scanf("%lu %lu %lu", ¥, &mg, &vol);
printf("%f\n", ((yen/COIN)*mg)/vol);
return 0;
}