結果

問題 No.1700 floor X
ユーザー ripityripity
提出日時 2021-12-13 23:41:07
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 529 bytes
コンパイル時間 1,665 ms
コンパイル使用メモリ 71,952 KB
実行使用メモリ 62,308 KB
最終ジャッジ日時 2023-09-30 05:30:00
合計ジャッジ時間 22,917 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 109 ms
55,440 KB
testcase_01 AC 426 ms
60,532 KB
testcase_02 AC 391 ms
60,496 KB
testcase_03 AC 404 ms
60,556 KB
testcase_04 AC 412 ms
60,972 KB
testcase_05 AC 415 ms
60,736 KB
testcase_06 AC 431 ms
61,068 KB
testcase_07 AC 436 ms
61,064 KB
testcase_08 AC 450 ms
61,132 KB
testcase_09 AC 424 ms
60,712 KB
testcase_10 AC 436 ms
61,532 KB
testcase_11 AC 412 ms
62,308 KB
testcase_12 AC 405 ms
60,432 KB
testcase_13 AC 416 ms
60,548 KB
testcase_14 AC 412 ms
60,388 KB
testcase_15 AC 412 ms
60,564 KB
testcase_16 AC 435 ms
60,996 KB
testcase_17 AC 425 ms
60,196 KB
testcase_18 AC 406 ms
60,176 KB
testcase_19 AC 404 ms
60,916 KB
testcase_20 AC 397 ms
62,172 KB
testcase_21 AC 448 ms
60,620 KB
testcase_22 AC 441 ms
60,576 KB
testcase_23 AC 436 ms
60,724 KB
testcase_24 AC 460 ms
60,768 KB
testcase_25 AC 435 ms
60,896 KB
testcase_26 AC 448 ms
60,520 KB
testcase_27 AC 449 ms
60,740 KB
testcase_28 AC 450 ms
60,624 KB
testcase_29 AC 454 ms
60,928 KB
testcase_30 AC 454 ms
60,808 KB
testcase_31 AC 534 ms
60,980 KB
testcase_32 AC 467 ms
58,792 KB
testcase_33 AC 440 ms
60,516 KB
testcase_34 AC 446 ms
60,620 KB
testcase_35 AC 427 ms
60,592 KB
testcase_36 AC 455 ms
60,648 KB
testcase_37 AC 459 ms
60,640 KB
testcase_38 AC 442 ms
60,460 KB
testcase_39 AC 433 ms
60,708 KB
testcase_40 AC 423 ms
60,976 KB
testcase_41 AC 437 ms
60,632 KB
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    
    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        int T = sc.nextInt();
        for( int i = 0; i < T; i++ ) {
            long N = sc.nextLong();
            double[] nt = new double[500];
            nt[0] = N;
            for( int j = 1; j < 500; j++ ) {
                nt[j] = nt[j-1]-(nt[j-1]*nt[j-1]-N)/(2*nt[j-1]);
            }
            System.out.println((int)Math.floor(nt[499]));
        }
        
    }
    
}
0