結果

問題 No.538 N.G.S.
ユーザー 14番14番
提出日時 2017-07-01 03:53:14
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,150 bytes
コンパイル時間 1,288 ms
コンパイル使用メモリ 110,524 KB
実行使用メモリ 29,452 KB
最終ジャッジ日時 2024-04-15 09:43:04
合計ジャッジ時間 4,215 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
25,100 KB
testcase_01 AC 30 ms
29,320 KB
testcase_02 AC 30 ms
25,524 KB
testcase_03 AC 30 ms
27,400 KB
testcase_04 AC 29 ms
27,264 KB
testcase_05 AC 30 ms
25,392 KB
testcase_06 AC 31 ms
25,100 KB
testcase_07 AC 30 ms
25,200 KB
testcase_08 AC 30 ms
25,140 KB
testcase_09 AC 30 ms
27,268 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 29 ms
23,348 KB
testcase_13 WA -
testcase_14 AC 29 ms
23,100 KB
testcase_15 AC 31 ms
27,076 KB
testcase_16 WA -
testcase_17 AC 30 ms
25,136 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 31 ms
23,352 KB
testcase_29 AC 30 ms
29,440 KB
testcase_30 AC 30 ms
27,280 KB
testcase_31 AC 30 ms
25,140 KB
testcase_32 AC 29 ms
25,484 KB
testcase_33 AC 29 ms
27,272 KB
testcase_34 AC 30 ms
25,092 KB
testcase_35 AC 29 ms
25,016 KB
testcase_36 AC 29 ms
24,892 KB
testcase_37 AC 29 ms
25,264 KB
testcase_38 AC 31 ms
27,152 KB
testcase_39 AC 31 ms
25,260 KB
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 AC 30 ms
27,148 KB
testcase_45 AC 28 ms
22,964 KB
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 WA -
testcase_50 WA -
testcase_51 WA -
testcase_52 AC 31 ms
25,280 KB
testcase_53 WA -
testcase_54 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.IO;
using System.Linq;
using System.Collections.Generic;
using System.Text;

public class Program
{

    public void Proc()
    {
        int[] inpt = Reader.ReadLine().Split(' ').Select(a => int.Parse(a)).ToArray();

        int num1 = inpt[1] - inpt[0];
        int num2 = inpt[2] - inpt[1];

        int ans = 0;
        if(num1 == num2) {
            ans = inpt[2] + num1;
        }
        if(num2%num1==0) {
            ans = inpt[2] + (num2 * (num2 / num1));
        }
        if(num1%num2 ==0) {
            ans = inpt[2] + (num2 / (num1 / num2));
        }
        Console.WriteLine(ans);


    }

    public class Reader
	{
		private static StringReader sr;
		public static bool IsDebug = false;
		public static string ReadLine()
		{
			if (IsDebug)
			{
				if (sr == null)
				{
					sr = new StringReader(InputText.Trim());
				}
				return sr.ReadLine();
			}
			else
			{
				return Console.ReadLine();
			}
		}
		private static string InputText = @"




3 -2 8




";
	}

	public static void Main(string[] args)
	{
#if DEBUG
		Reader.IsDebug = true;
#endif
		Program prg = new Program();
		prg.Proc();
	}
}
0