結果

問題 No.453 製薬会社
ユーザー selpoGselpoG
提出日時 2016-12-05 13:43:12
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 70 ms / 2,000 ms
コード長 1,107 bytes
コンパイル時間 3,582 ms
コンパイル使用メモリ 104,980 KB
実行使用メモリ 24,136 KB
最終ジャッジ日時 2023-08-18 15:09:52
合計ジャッジ時間 4,816 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
24,104 KB
testcase_01 AC 69 ms
21,828 KB
testcase_02 AC 64 ms
21,964 KB
testcase_03 AC 70 ms
21,964 KB
testcase_04 AC 63 ms
21,932 KB
testcase_05 AC 64 ms
23,864 KB
testcase_06 AC 64 ms
23,864 KB
testcase_07 AC 68 ms
23,916 KB
testcase_08 AC 63 ms
21,832 KB
testcase_09 AC 67 ms
21,832 KB
testcase_10 AC 69 ms
24,136 KB
testcase_11 AC 69 ms
22,036 KB
testcase_12 AC 69 ms
21,784 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

#pragma warning disable
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System;
class E { static void Main() { new J(); } }
class J
{
	int F() { return int.Parse(Console.ReadLine()); }
	int[] G() { return Console.ReadLine().Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToArray(); }
	public J()
	{
		Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });
		var I = G();
		int C = I[0], D = I[1];
		if (5 * C <= 2 * D) Console.WriteLine(7000 * C);
		else if (C > 3 * D) Console.WriteLine(4000 * D);
		else Console.WriteLine((6 * C + 34 * D) * 1000 / 13m);
		Console.Out.Flush();
	}
	long GCD(long a, long b)
	{
		var n = (ulong)Math.Abs(a); var m = (ulong)Math.Abs(b);
		if (n == 0) return (long)m; if (m == 0) return (long)n;
		int zm = 0, zn = 0;
		while ((n & 1) == 0) { n >>= 1; zn++; }
		while ((m & 1) == 0) { m >>= 1; zm++; }
		while (m != n)
		{
			if (m > n) { m -= n; while ((m & 1) == 0) m >>= 1; }
			else { n -= m; while ((n & 1) == 0) n >>= 1; }
		}
		return (long)n << Math.Min(zm, zn);
	}
}
0