結果

問題 No.857 素振り
コンテスト
ユーザー 大谷祐翔
提出日時 2025-12-04 15:05:42
言語 C#
(.NET 8.0.404)
結果
AC  
実行時間 54 ms / 1,000 ms
コード長 562 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 7,314 ms
コンパイル使用メモリ 168,132 KB
実行使用メモリ 187,820 KB
最終ジャッジ日時 2025-12-04 15:05:51
合計ジャッジ時間 8,813 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 8
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (102 ミリ秒)。
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #
raw source code

class Program
{
    static void Main(string[] args)
    {
        string[] input = Console.ReadLine()!.Split(' ');
        decimal holiday1 = decimal.Parse(input[0]);
        decimal holiday2 = decimal.Parse(input[1]);
        decimal now = decimal.Parse(input[2]);

        if (now > holiday1 && now >= holiday2)
        {
            Console.WriteLine(now - 2);
        }
        else if (now < holiday2 && now >= holiday1)
        {
            Console.WriteLine(now - 1);
        }
        else
        {
            Console.WriteLine(now);
        }
    }
}
0