結果

問題 No.857 素振り
コンテスト
ユーザー ruuuuutopia
提出日時 2021-06-01 21:10:38
言語 C#
(.NET 10.0.201)
コンパイル:
dotnet_c
実行:
/usr/bin/dotnet_wrap
結果
RE  
実行時間 -
コード長 577 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 15,684 ms
コンパイル使用メモリ 174,464 KB
実行使用メモリ 202,752 KB
最終ジャッジ日時 2026-05-09 04:45:35
合計ジャッジ時間 13,990 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 2 RE * 6
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (90 ミリ秒)。
  main -> /home/judge/data/code/bin/Release/net10.0/main.dll
  main -> /home/judge/data/code/bin/Release/net10.0/publish/

ソースコード

diff #
raw source code

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