結果

問題 No.63 ポッキーゲーム
ユーザー qwrtpsfgqwrtpsfg
提出日時 2017-08-06 20:22:58
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 639 ms / 5,000 ms
コード長 589 bytes
コンパイル時間 2,408 ms
コンパイル使用メモリ 100,316 KB
実行使用メモリ 24,652 KB
最終ジャッジ日時 2023-08-25 19:36:45
合計ジャッジ時間 6,641 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
20,720 KB
testcase_01 AC 58 ms
22,668 KB
testcase_02 AC 58 ms
20,660 KB
testcase_03 AC 58 ms
20,680 KB
testcase_04 AC 57 ms
20,620 KB
testcase_05 AC 57 ms
20,764 KB
testcase_06 AC 58 ms
20,716 KB
testcase_07 AC 57 ms
18,652 KB
testcase_08 AC 59 ms
20,624 KB
testcase_09 AC 58 ms
20,624 KB
testcase_10 AC 63 ms
22,772 KB
testcase_11 AC 639 ms
20,700 KB
testcase_12 AC 70 ms
20,704 KB
testcase_13 AC 630 ms
20,552 KB
testcase_14 AC 69 ms
18,636 KB
testcase_15 AC 69 ms
20,796 KB
testcase_16 AC 60 ms
22,676 KB
testcase_17 AC 586 ms
22,748 KB
testcase_18 AC 60 ms
24,652 KB
testcase_19 AC 141 ms
20,680 KB
testcase_20 AC 69 ms
20,616 KB
testcase_21 AC 83 ms
22,728 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Linq;

public class yukicoder{
    public static void Main(){
        string[] input = Console.ReadLine().Trim().Split(' ');
        int length = int.Parse(input[0]);
        int eat = int.Parse(input[1]);
        int a = 0;
        int b = 0;
        
        while(true)
        {
            length = length - eat;
            a = a + eat;
            if(length - eat <= 0)
            {
                break;                
            }
            length = length - eat;
            b = b + eat;
        }
        
        Console.WriteLine(b);

    }
}
0