結果

問題 No.63 ポッキーゲーム
ユーザー mustonmuston
提出日時 2016-05-20 15:54:56
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 5,000 ms
コード長 569 bytes
コンパイル時間 1,894 ms
コンパイル使用メモリ 71,336 KB
実行使用メモリ 56,412 KB
最終ジャッジ日時 2023-08-25 19:10:56
合計ジャッジ時間 5,273 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 108 ms
55,912 KB
testcase_01 AC 113 ms
55,536 KB
testcase_02 AC 113 ms
55,568 KB
testcase_03 AC 110 ms
56,228 KB
testcase_04 AC 105 ms
55,672 KB
testcase_05 AC 112 ms
55,736 KB
testcase_06 AC 109 ms
55,904 KB
testcase_07 AC 112 ms
56,096 KB
testcase_08 AC 109 ms
56,412 KB
testcase_09 AC 112 ms
55,672 KB
testcase_10 AC 109 ms
55,568 KB
testcase_11 AC 115 ms
56,184 KB
testcase_12 AC 111 ms
55,684 KB
testcase_13 AC 117 ms
55,768 KB
testcase_14 AC 112 ms
55,916 KB
testcase_15 AC 117 ms
55,896 KB
testcase_16 AC 117 ms
55,484 KB
testcase_17 AC 123 ms
55,680 KB
testcase_18 AC 122 ms
55,912 KB
testcase_19 AC 122 ms
55,740 KB
testcase_20 AC 112 ms
56,096 KB
testcase_21 AC 112 ms
56,020 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
/*yukicoder No63 ポッキーゲーム*/
class No63{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    double l = scan.nextInt();  //ポッキーの長さ
    double k = scan.nextInt();  //一度に食べ進める長さ
    double count = 0;  //食べた回数
    double yuu = 0;  //ユウちゃんが食べた長さ
    //ユウちゃんが食べた回数を出す
    count = Math.ceil(l/(k*2))-1;
    //ユウちゃんが食べた長さを出力
    yuu = count * k;
    System.out.println((int)yuu);
  }
}
0