結果
問題 |
No.538 N.G.S.
|
ユーザー |
![]() |
提出日時 | 2017-06-30 23:03:11 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 338 bytes |
コンパイル時間 | 130 ms |
コンパイル使用メモリ | 27,776 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-04 21:06:16 |
合計ジャッジ時間 | 1,391 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 34 WA * 17 |
ソースコード
#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 = b2 - r * b1; #ifdef DEBUG printf("r %f d %f\n", r, d); #endif int ans = r*b3+d; printf("%d\n", ans); return 0; }