結果

問題 No.98 円を描こう
ユーザー ontama_12
提出日時 2016-09-28 19:26:15
言語 JavaScript
(node v23.5.0)
結果
AC  
実行時間 68 ms / 5,000 ms
コード長 551 bytes
コンパイル時間 39 ms
コンパイル使用メモリ 6,944 KB
実行使用メモリ 39,424 KB
最終ジャッジ日時 2024-10-12 23:53:48
合計ジャッジ時間 1,130 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

    /////////////////////////////No.98 円を描こう
    //入力文字読み取り
   var inputall = require('fs').readFileSync('/dev/stdin', 'utf8').trim();

    //すべて受け取り一文字ずつ区切って格納
    var input = inputall.split(" ");

    //x軸
    var x = Number(input[0]);

    //y軸
    var y = Number(input[1]);

    //2乗
    var pow_x = Math.pow(x, 2);
    var pow_y = Math.pow(y, 2);

    //平方根
    var sqrt = Math.sqrt(pow_x + pow_y)*2
    var sqrt_floor = Math.floor(sqrt);

    console.log(sqrt_floor + 1);
0