結果

問題 No.46 はじめのn歩
ユーザー aaaaaaaaaaaaaa
提出日時 2022-05-24 10:23:28
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 58 ms / 5,000 ms
コード長 544 bytes
コンパイル時間 7,177 ms
コンパイル使用メモリ 158,504 KB
実行使用メモリ 176,424 KB
最終ジャッジ日時 2023-10-20 17:56:00
合計ジャッジ時間 8,457 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
31,032 KB
testcase_01 AC 57 ms
31,032 KB
testcase_02 AC 58 ms
31,032 KB
testcase_03 AC 56 ms
31,032 KB
testcase_04 AC 57 ms
31,012 KB
testcase_05 AC 57 ms
31,012 KB
testcase_06 AC 57 ms
31,012 KB
testcase_07 AC 56 ms
31,032 KB
testcase_08 AC 56 ms
31,012 KB
testcase_09 AC 56 ms
176,424 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (96 ms)。
MSBuild のバージョン 17.7.3+8ec440e68 (.NET)
/home/judge/data/code/Main.cs(11,17): warning CS0219: 変数 'ans' は割り当てられていますが、その値は使用されていません [/home/judge/data/code/main.csproj]
  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]);
            num = b % a ;
            if (num != 0)
            {
                num = (b / a) + 1;
            }
            else
            {
                num = b / a;
            }
	     Console.WriteLine(num.ToString());
        }
    }
}
0