結果

問題 No.604 誕生日のお小遣い
ユーザー kekuremakekurema
提出日時 2019-03-26 10:36:10
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 582 bytes
コンパイル時間 1,718 ms
コンパイル使用メモリ 105,192 KB
実行使用メモリ 28,036 KB
最終ジャッジ日時 2024-04-19 08:40:33
合計ジャッジ時間 3,122 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 24 ms
25,856 KB
testcase_02 AC 24 ms
21,936 KB
testcase_03 AC 24 ms
24,112 KB
testcase_04 AC 24 ms
23,772 KB
testcase_05 AC 25 ms
26,256 KB
testcase_06 AC 24 ms
23,956 KB
testcase_07 AC 25 ms
25,948 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 24 ms
25,740 KB
testcase_11 AC 24 ms
24,028 KB
testcase_12 AC 24 ms
23,772 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 24 ms
24,104 KB
testcase_16 WA -
testcase_17 AC 24 ms
25,872 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 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.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Code
{
    class Program
    {
        static void Main(string[] args)
        {
            string line = Console.ReadLine();
            string[] values = line.Split(' ');
            long A = long.Parse(values[0]); 
            long B = long.Parse(values[1]); 
            long C = long.Parse(values[2]); 

            //M年ごとにA+B-1円
            long turn = C / (A + B - 1);
            Console.WriteLine(turn * (1 - B) + C);
        }
    }
}
0