結果

問題 No.538 N.G.S.
ユーザー ひゅーら
提出日時 2017-07-01 00:35:30
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 350 bytes
コンパイル時間 182 ms
コンパイル使用メモリ 27,648 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-04 22:21:05
合計ジャッジ時間 1,392 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 31 WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
int main(void){
	int tb1, tb2, tb3;
	scanf("%d%d%d", &tb1, &tb2, &tb3);
	float b1 = tb1, b2 = tb2, b3 = tb3;
	float dis1, dis2;
	dis1 = b2-b1;
	dis2 = b3-b2;
	float r = (dis2-dis1)/(b2-b1)+1;
	float d = dis2 - b2*(r-1);
#ifdef DEBUG
printf("r %f  d %f\n", r, d);
#endif
	long long ans = r*b3+d;
	printf("%lld\n", ans);
	return 0;
}
0