結果

問題 No.509 塗りつぶしツール
ユーザー mbanmban
提出日時 2017-04-29 03:31:14
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 837 bytes
コンパイル時間 2,208 ms
コンパイル使用メモリ 104,904 KB
実行使用メモリ 22,740 KB
最終ジャッジ日時 2023-10-11 20:10:47
合計ジャッジ時間 4,992 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
22,480 KB
testcase_01 AC 52 ms
22,536 KB
testcase_02 AC 51 ms
20,692 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 52 ms
20,656 KB
testcase_07 WA -
testcase_08 AC 52 ms
20,540 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 52 ms
20,552 KB
testcase_15 WA -
testcase_16 AC 51 ms
20,516 KB
testcase_17 WA -
testcase_18 AC 52 ms
20,436 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 51 ms
18,480 KB
testcase_23 AC 51 ms
20,556 KB
testcase_24 AC 52 ms
22,492 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 51 ms
20,428 KB
testcase_28 AC 51 ms
20,520 KB
testcase_29 AC 52 ms
20,572 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;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using System.Text.RegularExpressions;
using System.Linq;

public class Program
{
    public static void Main(string[] args)
    {
        new Magatro().Solve();
    }
}

class Magatro
{
    
    public void Solve()
    {
        var s = Console.ReadLine();
        int ans = s.Length;
        ans++;
        foreach(char c in s)
        {
            switch (c)
            {
                case '0':
                case '4':
                case '6':
                case '9':
                    ans++;
                    break;
                case '8':
                    ans += 2;
                    break;
            }
        }
        ans += s.Length;
        Console.WriteLine(ans);
    }
}
0