結果
問題 |
No.509 塗りつぶしツール
|
ユーザー |
![]() |
提出日時 | 2017-04-29 03:31:14 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 837 bytes |
コンパイル時間 | 4,337 ms |
コンパイル使用メモリ | 111,356 KB |
実行使用メモリ | 27,980 KB |
最終ジャッジ日時 | 2024-09-13 19:00:33 |
合計ジャッジ時間 | 3,398 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 WA * 16 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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); } }