結果

問題 No.63 ポッキーゲーム
ユーザー fujitafujita
提出日時 2023-04-25 11:08:47
言語 C#
(.NET 8.0.203)
結果
WA  
実行時間 -
コード長 717 bytes
コンパイル時間 13,382 ms
コンパイル使用メモリ 169,584 KB
実行使用メモリ 186,096 KB
最終ジャッジ日時 2024-04-26 17:38:15
合計ジャッジ時間 9,972 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
28,800 KB
testcase_01 AC 47 ms
28,800 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 48 ms
28,672 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 49 ms
28,800 KB
testcase_14 WA -
testcase_15 AC 48 ms
28,544 KB
testcase_16 AC 46 ms
28,672 KB
testcase_17 AC 48 ms
28,544 KB
testcase_18 AC 50 ms
28,416 KB
testcase_19 AC 46 ms
28,672 KB
testcase_20 AC 48 ms
28,672 KB
testcase_21 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (113 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

using System;
namespace yukicoder
{
    class Program
    {

        static void Main(string[] args)
        {
            var L = Console.ReadLine();
            var z = L.Split(" ");
            int[] ints = new int[z.Length];
            //文字分割
            for (int i = 0; i < z.Length; i++)
            {
                ints[i] = int.Parse(z[i]);
            }

            if (ints[0] / 2 <= ints[1])
            {
                Console.WriteLine("0");
            }
            else if (ints[0] > ints[1] * 2)
            {
                int temp = ints[0] / (ints[1] * 2);
                int ans = temp * ints[1] - ints[1];
                Console.WriteLine(ans);
            }
        }
    }
}
0