結果

問題 No.128 お年玉(1)
コンテスト
ユーザー 大谷祐翔
提出日時 2025-11-05 11:14:56
言語 C#
(.NET 8.0.404)
結果
RE  
実行時間 -
コード長 507 bytes
コンパイル時間 8,066 ms
コンパイル使用メモリ 170,132 KB
実行使用メモリ 194,536 KB
最終ジャッジ日時 2025-11-05 11:15:10
合計ジャッジ時間 13,296 ms
ジャッジサーバーID
(参考情報)
judge2 / judge7
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5 RE * 16
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (116 ミリ秒)。
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

class Program
{
    static void Main(string[] args)
    {
        string inputMone = Console.ReadLine()!;
        string inputCount = Console.ReadLine()!;

        int mone = int.Parse(inputMone);
        int count = int.Parse(inputCount);

        int ans = mone / count;

        if (ans < 1000)
        {
            ans = 0;
        }
        else if(ans % 1000 != 0)
        {
            int remainder = ans % 1000;
            ans = ans - remainder;
        }

        Console.WriteLine(ans);
    }
}
0