結果

問題 No.98 円を描こう
ユーザー neko_the_shadowneko_the_shadow
提出日時 2017-01-22 13:00:10
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 17 ms / 5,000 ms
コード長 298 bytes
コンパイル時間 227 ms
コンパイル使用メモリ 5,480 KB
実行使用メモリ 11,868 KB
最終ジャッジ日時 2023-08-24 19:59:19
合計ジャッジ時間 970 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
11,868 KB
testcase_01 AC 16 ms
11,692 KB
testcase_02 AC 16 ms
11,752 KB
testcase_03 AC 15 ms
11,844 KB
testcase_04 AC 16 ms
11,696 KB
testcase_05 AC 16 ms
11,748 KB
testcase_06 AC 17 ms
11,752 KB
testcase_07 AC 17 ms
11,868 KB
testcase_08 AC 16 ms
11,856 KB
testcase_09 AC 17 ms
11,748 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (solve)
    (receive (x y)
             (apply values (map string->number (string-split (read-line) #\space)))
        (let* ((r (* 2 (sqrt (+ (expt x 2) (expt y 2)))))
               (s (ceiling->exact r)))
            (if (= r s) (+ 1 s) s))))

(begin
    (display (solve))
    (newline))
0