結果

問題 No.735 接線
コンテスト
ユーザー subsn
提出日時 2023-06-16 11:39:33
言語 C90(gcc12)
(gcc 12.4.0)
コンパイル:
gcc-12 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 88 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 98 ms
コンパイル使用メモリ 29,128 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2026-03-08 16:34:57
合計ジャッジ時間 917 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:4:5: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
    4 |     scanf("%lf%lf",&r,&d);
      |     ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
  +++ |+#include <stdio.h>
    1 | main()
main.c:5:5: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
    5 |     printf("%lf\n",sqrt(d*d-r*r));
      |     ^~~~~~
main.c:5:5: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
main.c:5:20: warning: incompatible implicit declaration of built-in function ‘sqrt’ [-Wbuiltin-declaration-mismatch]
    5 |     printf("%lf\n",sqrt(d*d-r*r));
      |                    ^~~~
main.c:1:1: note: include ‘<math.h>’ or provide a declaration of ‘sqrt’
  +++ |+#include <math.h>
    1 | main()

ソースコード

diff #
raw source code

main()
{
    double r,d;
    scanf("%lf%lf",&r,&d);
    printf("%lf\n",sqrt(d*d-r*r));
}
0