結果
問題 | No.236 鴛鴦茶 |
ユーザー |
|
提出日時 | 2016-11-23 17:08:13 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 183 bytes |
コンパイル時間 | 111 ms |
コンパイル使用メモリ | 20,992 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 13:09:18 |
合計ジャッジ時間 | 854 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%lf%lf%lf%lf",&a,&b,&x,&y); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h> int main(void){ double a,b,x,y; scanf("%lf%lf%lf%lf",&a,&b,&x,&y); if(x/a < y/b){printf("%.13lf\n",x*(a+b)/a);} else{printf("%.13lf\n",y*(a+b)/b);} return 0; }