結果

問題 No.63 ポッキーゲーム
ユーザー GBGB
提出日時 2018-04-10 20:10:30
言語 Java21
(openjdk 21)
結果
AC  
実行時間 360 ms / 5,000 ms
コード長 367 bytes
コンパイル時間 2,842 ms
コンパイル使用メモリ 71,464 KB
実行使用メモリ 56,504 KB
最終ジャッジ日時 2023-09-09 03:48:54
合計ジャッジ時間 7,374 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,612 KB
testcase_01 AC 119 ms
55,760 KB
testcase_02 AC 121 ms
53,816 KB
testcase_03 AC 120 ms
55,684 KB
testcase_04 AC 117 ms
55,740 KB
testcase_05 AC 118 ms
55,748 KB
testcase_06 AC 119 ms
56,072 KB
testcase_07 AC 122 ms
55,584 KB
testcase_08 AC 120 ms
55,560 KB
testcase_09 AC 124 ms
53,532 KB
testcase_10 AC 124 ms
55,424 KB
testcase_11 AC 358 ms
55,920 KB
testcase_12 AC 128 ms
55,628 KB
testcase_13 AC 360 ms
55,804 KB
testcase_14 AC 128 ms
55,972 KB
testcase_15 AC 129 ms
55,812 KB
testcase_16 AC 121 ms
55,612 KB
testcase_17 AC 342 ms
56,056 KB
testcase_18 AC 124 ms
55,852 KB
testcase_19 AC 152 ms
56,064 KB
testcase_20 AC 124 ms
56,504 KB
testcase_21 AC 130 ms
56,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;

class Main{
  public static void main(String[] args) throws IOException{

    Scanner scan=new Scanner(System.in);
    int l=Integer.parseInt(scan.next());
    int k=Integer.parseInt(scan.next());

    int count=0;
    while(l>2*k){
      l-=2*k;
      count++;
    }
    
    int yuu=k*count;
    System.out.println(yuu);
  }
}
0