結果

問題 No.637 X: Yet Another FizzBuzz Problem
ユーザー バカらっくバカらっく
提出日時 2018-01-27 06:23:42
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 67 ms / 1,000 ms
コード長 1,144 bytes
コンパイル時間 2,491 ms
コンパイル使用メモリ 106,976 KB
実行使用メモリ 24,052 KB
最終ジャッジ日時 2023-09-11 04:21:13
合計ジャッジ時間 5,902 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
23,808 KB
testcase_01 AC 64 ms
19,712 KB
testcase_02 AC 64 ms
21,740 KB
testcase_03 AC 64 ms
21,828 KB
testcase_04 AC 64 ms
23,848 KB
testcase_05 AC 64 ms
24,052 KB
testcase_06 AC 63 ms
21,800 KB
testcase_07 AC 64 ms
23,792 KB
testcase_08 AC 64 ms
21,816 KB
testcase_09 AC 64 ms
21,808 KB
testcase_10 AC 64 ms
22,092 KB
testcase_11 AC 64 ms
21,860 KB
testcase_12 AC 65 ms
23,860 KB
testcase_13 AC 65 ms
23,808 KB
testcase_14 AC 65 ms
21,936 KB
testcase_15 AC 65 ms
21,944 KB
testcase_16 AC 65 ms
21,804 KB
testcase_17 AC 64 ms
21,816 KB
testcase_18 AC 64 ms
21,804 KB
testcase_19 AC 65 ms
21,780 KB
testcase_20 AC 64 ms
21,956 KB
testcase_21 AC 64 ms
23,956 KB
testcase_22 AC 65 ms
23,944 KB
testcase_23 AC 65 ms
23,892 KB
testcase_24 AC 64 ms
23,932 KB
testcase_25 AC 64 ms
21,856 KB
testcase_26 AC 64 ms
21,856 KB
testcase_27 AC 65 ms
19,812 KB
testcase_28 AC 65 ms
23,804 KB
testcase_29 AC 65 ms
23,876 KB
testcase_30 AC 67 ms
21,896 KB
testcase_31 AC 65 ms
23,788 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.IO;
using System.Linq;
using System.Collections.Generic;
using System.Text;

public class Program
{

    public void Proc()
    {
        int[] inpt = Reader.ReadLine().Split(' ').Select(a => int.Parse(a)).ToArray();
        int ans = inpt.Select(a => (a % 5 == 0 && a % 3 == 0) ? 8 : ((a % 5 == 0 || a % 3 == 0) ? 4 : a.ToString().Length)).Sum();
        Console.WriteLine(ans);    
    }



    public class Reader
    {
        private static StringReader sr;
        public static bool IsDebug = false;
        public static string ReadLine()
        {
            if (IsDebug)
            {
                if (sr == null)
                {
                    sr = new StringReader(InputText.Trim());
                }
                return sr.ReadLine();
            }
            else
            {
                return Console.ReadLine();
            }
        }
        private static string InputText = @"


123 45 678 901 234




";
    }

    public static void Main(string[] args)
    {
#if DEBUG
        Reader.IsDebug = true;
#endif
        Program prg = new Program();
        prg.Proc();
    }
}
0