結果

問題 No.857 素振り
ユーザー hayashi
提出日時 2019-10-29 12:28:25
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 638 bytes
コンパイル時間 782 ms
コンパイル使用メモリ 108,024 KB
実行使用メモリ 23,600 KB
最終ジャッジ日時 2024-09-14 21:26:30
合計ジャッジ時間 1,595 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 2 RE * 6
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using static System.Console;
namespace ConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] N = ReadLine().Split(' ');
            int X = int.Parse(N[0]);
            int Y = int.Parse(N[1]);
            int Z = int.Parse(N[2]);

            if(X > Z)
            {
                WriteLine(0);
            }
            else if(X <= Z && Y > Z || Y <= Z && X > Z || X == Y)
            {
                WriteLine(Z - 1);
            }
            else
            {
                WriteLine(Z - 2);
            }
        }
    }
}
0