結果

問題 No.857 素振り
ユーザー merumeru_333333merumeru_333333
提出日時 2019-08-25 16:55:31
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 757 bytes
コンパイル時間 799 ms
コンパイル使用メモリ 102,912 KB
実行使用メモリ 17,920 KB
最終ジャッジ日時 2024-04-24 11:41:39
合計ジャッジ時間 1,622 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 24 ms
17,920 KB
testcase_01 AC 25 ms
17,920 KB
testcase_02 AC 24 ms
17,920 KB
testcase_03 AC 25 ms
17,920 KB
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
class Program
{
    static void Main(string[] args)
    {
        int day = 1;
        int cnt = 0;
        int x,y,z;
        string[] str = Console.ReadLine().Split(' ');//2つ以上のスペース区切り入力の取得
        x = int.Parse(str[0]);  //数値で受け取りたい場合は変換する
        y = int.Parse(str[1]);  //数値で受け取りたい場合は変換する
        z = int.Parse(str[2]);  //数値で受け取りたい場合は変換する
        while (day <= z)
        {
            if (day != x)
            {
                if (day != y)
                {
                    cnt = cnt + 1;
                }
            }
            day = day + 1;
        }
            Console.WriteLine(cnt);
    }
}
0