結果

問題 No.111 あばばばば
ユーザー chiho_miyakochiho_miyako
提出日時 2015-04-07 09:17:05
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 330 bytes
コンパイル時間 1,974 ms
コンパイル使用メモリ 71,568 KB
実行使用メモリ 56,136 KB
最終ジャッジ日時 2023-09-17 06:28:07
合計ジャッジ時間 4,327 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,908 KB
testcase_01 AC 125 ms
55,816 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 125 ms
55,900 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 127 ms
55,700 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner koko = new Scanner(System.in);
       int l = koko.nextInt();
       int n = (l-1)/2;
       int kai = 0;
       for(int i=0; i<n; i++){
           kai=kai+1+2*i;
       }
       System.out.println(kai);
    }
}
0