結果

問題 No.98 円を描こう
ユーザー neko_the_shadowneko_the_shadow
提出日時 2017-01-22 12:54:19
言語 Scheme
(Gauche-0.9.14)
結果
WA  
実行時間 -
コード長 347 bytes
コンパイル時間 37 ms
コンパイル使用メモリ 5,296 KB
実行使用メモリ 11,936 KB
最終ジャッジ日時 2023-08-24 19:59:14
合計ジャッジ時間 934 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
11,732 KB
testcase_01 AC 17 ms
11,736 KB
testcase_02 AC 17 ms
11,832 KB
testcase_03 AC 18 ms
11,736 KB
testcase_04 AC 17 ms
11,736 KB
testcase_05 AC 17 ms
11,656 KB
testcase_06 WA -
testcase_07 AC 18 ms
11,924 KB
testcase_08 AC 17 ms
11,752 KB
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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