結果

問題 No.735 接線
ユーザー toshiro_yanagi
提出日時 2018-12-29 17:00:41
言語 Nim
(2.2.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 423 bytes
コンパイル時間 3,283 ms
コンパイル使用メモリ 64,316 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-01 06:17:35
合計ジャッジ時間 4,321 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

import strutils, math


proc nextString: string =
    result = ""
    while not endOfFile stdin:
        let nextChar = readChar stdin
        case nextChar
        of '\r':
            discard
        of "\n"[0], ' ':
            break
        else:
            add result, nextChar


proc main: void =
    let r, d = parseFloat nextString()
    writeLine stdout, pow((d ^ 2 - r ^ 2), 0.5)


when isMainModule:
    main()
0