結果

問題 No.46 はじめのn歩
ユーザー aaaaaaa
提出日時 2022-05-24 10:23:28
言語 C#
(.NET 8.0.404)
結果
AC  
実行時間 48 ms / 5,000 ms
コード長 544 bytes
コンパイル時間 8,126 ms
コンパイル使用メモリ 166,112 KB
実行使用メモリ 184,032 KB
最終ジャッジ日時 2024-09-20 13:34:37
合計ジャッジ時間 7,672 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (102 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.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/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)
        {
            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