結果

問題 No.63 ポッキーゲーム
ユーザー TDTD
提出日時 2022-05-26 13:21:22
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 722 bytes
コンパイル時間 861 ms
コンパイル使用メモリ 106,292 KB
実行使用メモリ 24,168 KB
最終ジャッジ日時 2023-10-20 19:24:53
合計ジャッジ時間 6,621 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
24,164 KB
testcase_01 AC 25 ms
24,164 KB
testcase_02 AC 26 ms
24,164 KB
testcase_03 AC 25 ms
24,164 KB
testcase_04 AC 25 ms
24,164 KB
testcase_05 AC 25 ms
24,164 KB
testcase_06 WA -
testcase_07 AC 25 ms
24,168 KB
testcase_08 AC 25 ms
24,168 KB
testcase_09 AC 28 ms
24,168 KB
testcase_10 AC 38 ms
24,168 KB
testcase_11 AC 1,414 ms
24,168 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 84 ms
24,168 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace yukicoder
{
    class Program
    {
        static void Main(string[] args)
        {

            string[] str = Console.ReadLine().Split(' ');
            int a = int.Parse(str[0]);
            int b = int.Parse(str[1]);
            int sum = 0;
            int num = 0;
            for(; ; )
            {
                sum += b;
                a-= b;
                if (a <= 0)
                {
                    break;
                }
                num += b;
                a -=b;
                if (a <= 0)
                {
                    num = 0;
                    break;
                }

            }
            Console.WriteLine(num.ToString());
        }
    }
}
0