結果

問題 No.857 素振り
ユーザー hayashihayashi
提出日時 2019-10-29 12:35:17
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 58 ms / 1,000 ms
コード長 654 bytes
コンパイル時間 1,942 ms
コンパイル使用メモリ 101,428 KB
実行使用メモリ 22,848 KB
最終ジャッジ日時 2023-10-12 23:19:28
合計ジャッジ時間 3,231 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
18,808 KB
testcase_01 AC 57 ms
22,656 KB
testcase_02 AC 58 ms
20,876 KB
testcase_03 AC 56 ms
20,688 KB
testcase_04 AC 57 ms
20,820 KB
testcase_05 AC 57 ms
20,656 KB
testcase_06 AC 57 ms
20,736 KB
testcase_07 AC 57 ms
20,760 KB
testcase_08 AC 56 ms
22,848 KB
testcase_09 AC 58 ms
22,760 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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(' ');
            long X = long.Parse(N[0]);
            long Y = long.Parse(N[1]);
            long Z = long.Parse(N[2]);

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