結果

問題 No.933 おまわりさんこいつです
ユーザー tomomo2b2tomomo2b2
提出日時 2019-11-29 21:47:24
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 742 bytes
コンパイル時間 910 ms
コンパイル使用メモリ 106,240 KB
実行使用メモリ 39,808 KB
最終ジャッジ日時 2024-04-30 23:17:49
合計ジャッジ時間 3,664 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
25,260 KB
testcase_01 AC 31 ms
25,176 KB
testcase_02 WA -
testcase_03 RE -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 125 ms
29,696 KB
testcase_18 AC 30 ms
19,200 KB
testcase_19 AC 147 ms
31,360 KB
testcase_20 WA -
testcase_21 AC 33 ms
19,072 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.Linq;
using System.Collections.Generic;
using System.IO;

class MyClass
{
    public static void Solve()
    {
        var N = int.Parse(Console.ReadLine());
        var P = Console.ReadLine().Split().ToArray();
        var Q = P.Select(x => x.ToCharArray().Select(y => int.Parse(y.ToString())).Sum());
        var prod = 1;
        foreach (var item in Q)
        {
            prod *= item;
        }
        Console.WriteLine(prod.ToString().ToCharArray().Select(y => int.Parse(y.ToString())).Sum());
    }

    public static void Main()
    {
        var sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
        Console.SetOut(sw);
        Solve();
        Console.Out.Flush();
    }
}
0