結果

問題 No.735 接線
ユーザー akakimidori
提出日時 2018-09-28 21:26:44
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 189 bytes
コンパイル時間 150 ms
コンパイル使用メモリ 23,424 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-26 03:15:00
合計ジャッジ時間 1,198 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘run’:
main.c:6:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |   scanf("%lf%lf",&r,&d);
      |   ^~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>
#include<math.h>

void run(void){
  double r,d;
  scanf("%lf%lf",&r,&d);
  double ans=sqrt((d+r)*(d-r));
  printf("%.9lf\n",ans);
}

int main(void){
  run();
  return 0;
}
0