結果
| 問題 | No.236 鴛鴦茶 |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2015-08-09 13:14:43 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 111 bytes |
| 記録 | |
| コンパイル時間 | 193 ms |
| コンパイル使用メモリ | 20,864 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-18 06:10:43 |
| 合計ジャッジ時間 | 976 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 23 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:3:1: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
3 | scanf("%d%d%d%d",&a,&b,&c,&d);
| ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
+++ |+#include <stdio.h>
1 | int main(){
main.c:3:1: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
3 | scanf("%d%d%d%d",&a,&b,&c,&d);
| ^~~~~
main.c:3:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
main.c:4:1: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
4 | printf("%d",b*c>a*d?d+d*a*1./b:c+c*b*1./a);
| ^~~~~~
main.c:4:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
main.c:4:1: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
main.c:4:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
main.c:4:10: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘double’ [-Wformat=]
4 | printf("%d",b*c>a*d?d+d*a*1./b:c+c*b*1./a);
| ~^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| int double
| %f
ソースコード
int main(){
int a,b,c,d;
scanf("%d%d%d%d",&a,&b,&c,&d);
printf("%d",b*c>a*d?d+d*a*1./b:c+c*b*1./a);
return 0;
}
testestest