結果
| 問題 |
No.1453 手助け
|
| コンテスト | |
| ユーザー |
AAAAAA
|
| 提出日時 | 2021-03-31 21:13:59 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 26 ms / 2,000 ms |
| コード長 | 1,606 bytes |
| コンパイル時間 | 950 ms |
| コンパイル使用メモリ | 101,760 KB |
| 実行使用メモリ | 18,048 KB |
| 最終ジャッジ日時 | 2024-12-15 13:48:42 |
| 合計ジャッジ時間 | 2,268 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
コンパイルメッセージ
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;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp189
{
class Program
{
static void Main(string[] args)
{
string[] str = Console.ReadLine().Split();
int a = int.Parse(str[0]);
int b = int.Parse(str[1]);
int c = int.Parse(str[2]);
int d = int.Parse(str[3]);
int e = int.Parse(str[4]);
int kin = 0;
int x = 0;
int kosuu = (b - c) * a;
for(int i = 1; i <= kosuu; i++)
{
if (i == 1)
{
kin += d;
x = d;
}
else
{
if (i % 10 == 0)
{
if (e <= x)
{
if (x - e > 0)
{
kin += (x - e);
x = x - e;
}
else
{
x = 0;
}
}
else
{
kin += x;
}
}
else
{
kin += x;
}
}
}
Console.WriteLine(kin);
Console.ReadLine();
}
}
}
AAAAAA