結果
問題 |
No.933 おまわりさんこいつです
|
ユーザー |
![]() |
提出日時 | 2019-11-29 21:47:24 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 742 bytes |
コンパイル時間 | 1,163 ms |
コンパイル使用メモリ | 114,312 KB |
実行使用メモリ | 48,036 KB |
最終ジャッジ日時 | 2024-11-20 21:51:17 |
合計ジャッジ時間 | 4,142 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 WA * 18 RE * 1 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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(); } }