結果

問題 No.46 はじめのn歩
ユーザー TDTD
提出日時 2022-05-24 09:40:00
言語 C#
(.NET 8.0.203)
結果
WA  
実行時間 -
コード長 610 bytes
コンパイル時間 17,918 ms
コンパイル使用メモリ 158,712 KB
実行使用メモリ 176,564 KB
最終ジャッジ日時 2023-10-20 17:53:52
合計ジャッジ時間 22,890 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (109 ms)。
MSBuild のバージョン 17.7.3+8ec440e68 (.NET)
  main -> /home/judge/data/code/bin/Release/net7.0/main.dll
  main -> /home/judge/data/code/bin/Release/net7.0/publish/

ソースコード

diff #

using System;

namespace yukicoder
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] str = Console.ReadLine().Split(' ');
            int num = 0;
            int ans = 0;
            int a = int.Parse(str[0]);
            int b = int.Parse(str[1]);

            for(; ; )
            {
                ans +=  a;
                num++;
                if (ans >= b)
                {
                    Console.WriteLine(num.ToString());
                    break;
                }
            }
            Console.WriteLine(num.ToString());
        }
    }
}
0