結果

問題 No.63 ポッキーゲーム
ユーザー fujitafujita
提出日時 2023-04-25 11:17:56
言語 C#
(.NET 8.0.203)
結果
WA  
実行時間 -
コード長 900 bytes
コンパイル時間 6,997 ms
コンパイル使用メモリ 167,096 KB
実行使用メモリ 183,864 KB
最終ジャッジ日時 2024-04-26 17:42:07
合計ジャッジ時間 8,878 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
28,416 KB
testcase_01 AC 49 ms
28,800 KB
testcase_02 WA -
testcase_03 AC 49 ms
28,544 KB
testcase_04 AC 48 ms
28,672 KB
testcase_05 AC 49 ms
28,672 KB
testcase_06 AC 47 ms
28,544 KB
testcase_07 AC 49 ms
28,416 KB
testcase_08 AC 51 ms
28,800 KB
testcase_09 WA -
testcase_10 AC 49 ms
28,800 KB
testcase_11 WA -
testcase_12 AC 48 ms
28,796 KB
testcase_13 AC 48 ms
28,544 KB
testcase_14 AC 48 ms
28,800 KB
testcase_15 AC 49 ms
28,796 KB
testcase_16 AC 48 ms
28,672 KB
testcase_17 AC 47 ms
28,800 KB
testcase_18 AC 48 ms
28,800 KB
testcase_19 AC 48 ms
28,544 KB
testcase_20 AC 47 ms
28,800 KB
testcase_21 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (88 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] == 0))
            {
                int temp = ints[0] / (ints[1] * 2);
                int ans = temp * ints[1] - ints[1];
                Console.WriteLine(ans);
            }
            else 
            {
                int temp = ints[0] / (ints[1] * 2);
                int ans = temp * ints[1];
                Console.WriteLine(ans);
            }
        }
    }
}
0