結果

問題 No.538 N.G.S.
ユーザー mban
提出日時 2017-07-10 22:32:34
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 25 ms / 2,000 ms
コード長 671 bytes
コンパイル時間 778 ms
コンパイル使用メモリ 108,092 KB
実行使用メモリ 26,140 KB
最終ジャッジ日時 2024-09-25 00:17:18
合計ジャッジ時間 3,436 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 51
権限があれば一括ダウンロードができます
コンパイルメッセージ
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;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using System.Text.RegularExpressions;
using System.Linq;
using System.IO;

class Program
{
    static void Main()
    {
        new Magatro().Solve();
    }
}

class Magatro
{
    private long B1, B2, B3;

    private void Scan()
    {
        var line = Console.ReadLine().Split(' ');
        B1 = long.Parse(line[0]);
        B2 = long.Parse(line[1]);
        B3 = long.Parse(line[2]);
    }

    public void Solve()
    {
        Scan();
        long ans = (B3 - B2) * (B3 - B1) / (B2 - B1) + B2;
        Console.WriteLine(ans);
    }
}
0