結果

問題 No.857 素振り
ユーザー ruuuuutopiaruuuuutopia
提出日時 2021-06-01 21:10:38
言語 C#
(.NET 8.0.203)
結果
RE  
実行時間 -
コード長 577 bytes
コンパイル時間 12,518 ms
コンパイル使用メモリ 169,404 KB
実行使用メモリ 191,292 KB
最終ジャッジ日時 2024-04-26 09:51:14
合計ジャッジ時間 15,330 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
28,928 KB
testcase_01 AC 46 ms
29,056 KB
testcase_02 AC 47 ms
29,040 KB
testcase_03 AC 48 ms
28,636 KB
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (86 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  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 ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] inputA = Console.ReadLine().Split(' ');
            int X = int.Parse(inputA[0])-1;
            int Y = int.Parse(inputA[1])-1;
            int Z = int.Parse(inputA[2]);
            int count = 0;
            for(int i = 0; i < Z; i++)
            {
                count++;
                if (i==X ||i==Y)
                {
                    count--;
                }
            }

            Console.WriteLine(count);
        }
    }
}
0