結果

問題 No.857 素振り
ユーザー merumeru_333333
提出日時 2019-08-25 16:55:31
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 757 bytes
コンパイル時間 825 ms
コンパイル使用メモリ 102,656 KB
実行使用メモリ 17,920 KB
最終ジャッジ日時 2024-11-06 19:29:04
合計ジャッジ時間 1,635 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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;
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