結果

問題 No.1700 floor X
ユーザー neko_the_shadowneko_the_shadow
提出日時 2021-10-10 01:31:34
言語 Perl
(5.38.2)
結果
AC  
実行時間 190 ms / 2,000 ms
コード長 368 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 5,216 KB
実行使用メモリ 5,092 KB
最終ジャッジ日時 2023-09-16 09:27:07
合計ジャッジ時間 7,037 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 5 ms
4,948 KB
testcase_01 AC 44 ms
5,044 KB
testcase_02 AC 43 ms
4,804 KB
testcase_03 AC 44 ms
5,028 KB
testcase_04 AC 43 ms
4,812 KB
testcase_05 AC 44 ms
4,800 KB
testcase_06 AC 47 ms
4,900 KB
testcase_07 AC 43 ms
4,880 KB
testcase_08 AC 43 ms
4,812 KB
testcase_09 AC 43 ms
4,928 KB
testcase_10 AC 44 ms
4,968 KB
testcase_11 AC 44 ms
4,904 KB
testcase_12 AC 44 ms
4,904 KB
testcase_13 AC 44 ms
4,904 KB
testcase_14 AC 43 ms
5,072 KB
testcase_15 AC 45 ms
5,068 KB
testcase_16 AC 44 ms
4,924 KB
testcase_17 AC 43 ms
5,028 KB
testcase_18 AC 43 ms
4,920 KB
testcase_19 AC 43 ms
4,824 KB
testcase_20 AC 44 ms
4,812 KB
testcase_21 AC 184 ms
4,840 KB
testcase_22 AC 185 ms
5,024 KB
testcase_23 AC 186 ms
5,044 KB
testcase_24 AC 185 ms
4,896 KB
testcase_25 AC 185 ms
4,964 KB
testcase_26 AC 186 ms
4,960 KB
testcase_27 AC 185 ms
4,988 KB
testcase_28 AC 185 ms
4,988 KB
testcase_29 AC 185 ms
5,092 KB
testcase_30 AC 185 ms
4,968 KB
testcase_31 AC 185 ms
4,824 KB
testcase_32 AC 186 ms
4,972 KB
testcase_33 AC 185 ms
4,884 KB
testcase_34 AC 185 ms
4,804 KB
testcase_35 AC 185 ms
5,024 KB
testcase_36 AC 186 ms
5,036 KB
testcase_37 AC 185 ms
4,812 KB
testcase_38 AC 186 ms
5,044 KB
testcase_39 AC 186 ms
4,968 KB
testcase_40 AC 185 ms
5,060 KB
testcase_41 AC 187 ms
4,816 KB
testcase_42 AC 5 ms
5,044 KB
testcase_43 AC 190 ms
4,880 KB
testcase_44 AC 189 ms
4,928 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

use utf8;
use strict;
use warnings;

sub bisect {
    my $n = shift;

    my $ok = 0;
    my $ng = $n+1;
    while (abs($ok-$ng) > 1) {
        my $mi = int(($ok + $ng) / 2);
        if ($mi*$mi <= $n) {
            $ok = $mi;
        } else {
            $ng = $mi;
        }
    }

    $ok;
}

my $t = <>;
while ($t--) {
    my $n = <>;
    print bisect($n), "\n";
}
0