結果

問題 No.453 製薬会社
ユーザー Yamyuki
提出日時 2016-12-04 11:03:51
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 299 bytes
コンパイル時間 101 ms
コンパイル使用メモリ 21,248 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-11-27 19:41:36
合計ジャッジ時間 669 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 7 WA * 2
権限があれば一括ダウンロードができます
コンパイルメッセージ
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("%d %d",&c,&d);
      |         ^~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>
int main(){
	int c,d;
	double p,max;
	scanf("%d %d",&c,&d);
	max=0.0;
	if(3*d-c<0){
		max=4000.0*(double)d;
	}else{
		max=4000.0/3.0*(double)c+34000.0/39.0*(double)(3*d-c);
		p=4000.0*(double)d-6000.0/13.0*(double)(3*d-c);
		max=(max<p)?p:max;
	}
	printf("%f\n",max);
	return 0;
}
0