AtCoder Beginner Contest 001

Submission #1435134

Source codeソースコード

using System;

public class Class1
{
    double[] wlist = { 0.2,1.5,3.3,5.4,7.9,10.7,13.8,17.1,20.8,24.4,28.4,32.6}; 
    static void Main()
    {
        string[] input = Console.ReadLine().Split(' ');
        int deg = int.Parse(input[0]);
        int dis = int.Parse(input[1]);
        string dir_string = Deg(deg);
        int w = Dis(dis);
        if(w == 0)
        {
            dir_string = "C";
        }
        Console.WriteLine(dir_string+" "+w);
    }
    static string Deg(int deg)
    {
        string dir;
        int dir_int = deg / 225;
        switch (dir_int)
        {
            case 1: dir = "NNE";break;
            case 2: dir = "NE";break;
            case 3: dir = "ENE";break;
            case 4: dir = "E";break;
            case 5: dir = "ESE";break;
            case 6: dir = "SE";break;
            case 7: dir = "SSE";break;
            case 8: dir = "S";break;
            case 9: dir = "SSW";break;
            case 10: dir = "SW";break;
            case 11: dir = "WSW";break;
            case 12: dir = "W";break;
            case 13: dir = "WNW";break;
            case 14: dir = "NW";break;
            case 15: dir = "NNW";break;
            default:dir = "N";break;
        }
        return dir;
    }
    static int Dis(int dis)
    {
        int w;
        for(int i = 0; i < wlist.length; i++)
        {
            if(dis <= wlist[i] * 60)
            {
                w = i;
                break;
            }
            else if(i == wlist.length - 1)
            {
                w = 12;
            }
        }
        return w;
    }
}

Submission

Task問題 C - 風力観測
User nameユーザ名 keel
Created time投稿日時
Language言語 C# (Mono 4.6.2.0)
Status状態 CE
Score得点 -
Source lengthソースコード長 1652 Byte
File nameファイル名
Exec time実行時間 -
Memory usageメモリ使用量 -

Compiler messageコンパイルメッセージ

./Main.cs(47,34): error CS1061: Type `double[]' does not contain a definition for `length' and no extension method `length' of type `double[]' could be found. Are you missing an assembly reference?
/usr/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error)
./Main.cs(49,23): error CS0120: An object reference is required to access non-static member `Class1.wlist'
./Main.cs(54,32): error CS1061: Type `double[]' does not contain a definition for `length' and no extension method `length' of type `double[]' could be found. Are you missing an assembly reference?
/usr/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error)

Test case