結果

問題 No.80 四角形を描こう
ユーザー t8m8⛄️t8m8⛄️
提出日時 2015-04-09 13:43:11
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 5,000 ms
コード長 795 bytes
コンパイル時間 3,301 ms
コンパイル使用メモリ 75,444 KB
実行使用メモリ 41,740 KB
最終ジャッジ日時 2024-04-16 22:27:30
合計ジャッジ時間 5,491 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
41,408 KB
testcase_01 AC 127 ms
41,312 KB
testcase_02 AC 116 ms
40,300 KB
testcase_03 AC 128 ms
41,020 KB
testcase_04 AC 129 ms
41,740 KB
testcase_05 AC 128 ms
41,588 KB
testcase_06 AC 129 ms
41,316 KB
testcase_07 AC 129 ms
41,656 KB
testcase_08 AC 128 ms
41,364 KB
testcase_09 AC 127 ms
41,284 KB
testcase_10 AC 131 ms
41,188 KB
testcase_11 AC 117 ms
41,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

//No.80 四角形を描こう

import java.util.*;
import java.io.*;
import static java.util.Arrays.*;
import static java.lang.Math.*;

public class No80 {
    
    static final Scanner in = new Scanner(System.in);
    static final PrintWriter out = new PrintWriter(System.out,false);

    static void solve() {
        int d = in.nextInt()/2;
        int max = 0;
        for (int i=1; i<=d; i++) max = max(max,i*(d-i));
        out.println(max);
    }

    public static void main(String[] args) {
        long start = System.currentTimeMillis();

        solve();
        out.flush();

        long end = System.currentTimeMillis();
        //trace(end-start + "ms");
        in.close();
        out.close();
    }

    static void trace(Object... o) { System.out.println(deepToString(o));}
}
0