結果

問題 No.481 1から10
ユーザー kimnykimny
提出日時 2017-11-16 20:51:45
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 58 ms / 2,000 ms
コード長 608 bytes
コンパイル時間 3,530 ms
コンパイル使用メモリ 99,540 KB
実行使用メモリ 22,760 KB
最終ジャッジ日時 2023-08-16 17:04:42
合計ジャッジ時間 4,302 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
20,892 KB
testcase_01 AC 58 ms
22,760 KB
testcase_02 AC 57 ms
20,800 KB
testcase_03 AC 56 ms
22,760 KB
testcase_04 AC 57 ms
22,628 KB
testcase_05 AC 58 ms
20,644 KB
testcase_06 AC 57 ms
20,712 KB
testcase_07 AC 58 ms
20,724 KB
testcase_08 AC 58 ms
20,904 KB
testcase_09 AC 58 ms
20,780 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 System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace yukicoder_481 {
    class Program {
        static void Main(string[] args) {
            string[] s = Console.ReadLine().Split(' ');
            int[] t = new int[s.Length];
            int count = 0;
            for (int i = 0; i < s.Length; i++) {
                t[i] = int.Parse(s[i]);
                if (t[i] != i + 1) {
                    count++;
                }
            }
            Console.WriteLine(10 - count);
            Console.ReadLine();
        }
    }
}
0