結果
| 問題 |
No.2562 数字探しゲーム(緑以下コンver.)
|
| コンテスト | |
| ユーザー |
aketijyuuzou
|
| 提出日時 | 2025-02-22 08:44:25 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,517 bytes |
| コンパイル時間 | 1,128 ms |
| コンパイル使用メモリ | 116,376 KB |
| 実行使用メモリ | 39,276 KB |
| 最終ジャッジ日時 | 2025-02-22 08:44:30 |
| 合計ジャッジ時間 | 4,364 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | AC * 1 WA * 9 |
コンパイルメッセージ
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.Generic;
using System.Linq;
// https://yukicoder.me/problems/no/2562
class Program
{
static string InputPattern = "InputX";
static List<string> GetInputList()
{
var WillReturn = new List<string>();
if (InputPattern == "Input1") {
WillReturn.Add("3");
WillReturn.Add("7");
WillReturn.Add("1 0 0 1 0 0 0 0 0");
WillReturn.Add("1");
WillReturn.Add("0 0 0 0 0 0 0 0 9");
WillReturn.Add("998244353");
WillReturn.Add("0 1 2 2 1 0 0 1 2");
}
else {
string wkStr;
while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr);
}
return WillReturn;
}
static void Main()
{
List<string> InputList = GetInputList();
for (int I = 1; I <= InputList.Count - 1; I += 2) {
decimal M = decimal.Parse(InputList[I]);
decimal[] DArr = InputList[I + 1].Split(' ').Select(pX => decimal.Parse(pX)).ToArray();
decimal Answer = Solve(M, DArr);
Console.WriteLine(Answer);
}
}
static decimal Solve(decimal pM, decimal[] pDArr)
{
decimal Answer = pM;
decimal Omomi = 1000000000;
for (int I = 0; I <= pDArr.GetUpperBound(0); I++) {
for (int J = 1; J <= pDArr[I]; J++) {
Answer += Omomi * (I + 1);
Omomi *= 10;
}
}
return Answer;
}
}
aketijyuuzou