結果
| 問題 | No.3678 しゃべりすぎた男 |
| コンテスト | |
| ユーザー |
aketijyuuzou
|
| 提出日時 | 2026-09-05 13:07:37 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,391 bytes |
| 記録 | |
| コンパイル時間 | 3,405 ms |
| コンパイル使用メモリ | 108,032 KB |
| 実行使用メモリ | 20,096 KB |
| 最終ジャッジ日時 | 2026-09-05 13:08:20 |
| 合計ジャッジ時間 | 3,037 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 WA * 5 |
コンパイルメッセージ
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;
class Program
{
static string InputPattern = "InputX";
static List<string> GetInputList()
{
var WillReturn = new List<string>();
if (InputPattern == "Input1") {
WillReturn.Add("204 507 241 694 2293 -1 -1");
}
else if (InputPattern == "Input2") {
WillReturn.Add("118 378 -1 -1 -1 -1 -1");
}
else if (InputPattern == "Input3") {
WillReturn.Add("1000 1000 1000 1000 1000 1000 1000");
}
else {
string wkStr;
while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr);
}
return WillReturn;
}
static long[] GetSplitArr(string pStr)
{
return (pStr == "" ? new string[0] : pStr.Split(' ')).Select(pX => long.Parse(pX)).ToArray();
}
static void Main()
{
List<string> InputList = GetInputList();
long[] TArr = GetSplitArr(InputList[0]);
long Sum = 0;
foreach (long EachA in TArr) {
if (EachA == -1) {
Console.WriteLine(-1);
continue;
}
Sum += EachA;
if (6000 - Sum >= 0) {
Console.WriteLine(6000 - Sum);
}
else {
Console.WriteLine(-1);
}
}
}
}
aketijyuuzou