結果
問題 | No.453 製薬会社 |
ユーザー |
![]() |
提出日時 | 2016-12-05 13:43:12 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 29 ms / 2,000 ms |
コード長 | 1,107 bytes |
コンパイル時間 | 2,792 ms |
コンパイル使用メモリ | 114,464 KB |
実行使用メモリ | 27,276 KB |
最終ジャッジ日時 | 2024-11-27 21:18:04 |
合計ジャッジ時間 | 2,055 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 9 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
#pragma warning disableusing 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);}}