結果

問題 No.538 N.G.S.
ユーザー 14番14番
提出日時 2017-07-01 03:54:30
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,157 bytes
コンパイル時間 1,164 ms
コンパイル使用メモリ 116,520 KB
実行使用メモリ 29,308 KB
最終ジャッジ日時 2024-04-15 09:43:12
合計ジャッジ時間 4,652 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
25,148 KB
testcase_01 AC 34 ms
27,188 KB
testcase_02 AC 35 ms
25,008 KB
testcase_03 AC 34 ms
27,000 KB
testcase_04 AC 35 ms
27,064 KB
testcase_05 AC 33 ms
25,148 KB
testcase_06 AC 35 ms
27,264 KB
testcase_07 AC 33 ms
25,464 KB
testcase_08 AC 34 ms
24,768 KB
testcase_09 AC 33 ms
25,148 KB
testcase_10 AC 33 ms
25,340 KB
testcase_11 AC 33 ms
27,000 KB
testcase_12 AC 32 ms
27,192 KB
testcase_13 WA -
testcase_14 AC 31 ms
24,876 KB
testcase_15 AC 33 ms
27,056 KB
testcase_16 WA -
testcase_17 AC 33 ms
27,312 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 32 ms
25,152 KB
testcase_21 AC 34 ms
24,892 KB
testcase_22 AC 33 ms
24,956 KB
testcase_23 AC 34 ms
25,020 KB
testcase_24 AC 33 ms
23,348 KB
testcase_25 AC 34 ms
27,260 KB
testcase_26 AC 32 ms
25,140 KB
testcase_27 AC 33 ms
25,136 KB
testcase_28 AC 33 ms
25,020 KB
testcase_29 AC 34 ms
25,280 KB
testcase_30 AC 33 ms
25,020 KB
testcase_31 AC 34 ms
27,264 KB
testcase_32 AC 34 ms
25,004 KB
testcase_33 AC 33 ms
25,140 KB
testcase_34 AC 32 ms
25,012 KB
testcase_35 AC 32 ms
25,348 KB
testcase_36 AC 33 ms
25,140 KB
testcase_37 AC 31 ms
25,148 KB
testcase_38 AC 34 ms
27,000 KB
testcase_39 AC 34 ms
25,144 KB
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 AC 32 ms
25,220 KB
testcase_45 AC 35 ms
25,272 KB
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 WA -
testcase_50 WA -
testcase_51 WA -
testcase_52 AC 33 ms
23,216 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();

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

        long 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 = @"




1 2 100000




";
	}

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