結果

問題 No.98 円を描こう
ユーザー 6soukiti296soukiti29
提出日時 2017-08-18 23:23:02
言語 Nim
(2.0.2)
結果
WA  
実行時間 -
コード長 270 bytes
コンパイル時間 3,182 ms
コンパイル使用メモリ 70,660 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-12 14:52:55
合計ジャッジ時間 3,825 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 WA -
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sequtils,strutils,math

proc hypot(x1,y1,x2,y2 : float64): float64=
    var
        x = abs(x1 - x2)
        y = y1 - y2
    return x * sqrt(1 + pow(y / x, 2))

var x,y : float64
(x,y) = stdin.readline.split.map(parsefloat)
echo floor(hypot(0,0,x,y) * 2).int  + 1
0