結果
| 問題 |
No.338 アンケート機能
|
| コンテスト | |
| ユーザー |
No
|
| 提出日時 | 2017-07-08 23:31:03 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 27 ms / 2,000 ms |
| コード長 | 906 bytes |
| コンパイル時間 | 911 ms |
| コンパイル使用メモリ | 111,336 KB |
| 実行使用メモリ | 26,268 KB |
| 最終ジャッジ日時 | 2024-10-06 20:18:54 |
| 合計ジャッジ時間 | 2,971 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
namespace ConsoleApp3
{
class Program
{
static void Main(string[] args)
{
string[] ss = Console.ReadLine().Split();
double a = double.Parse(ss[0]);
double b = double.Parse(ss[1]);
for (int x = 0; x <= 200; x++)
{
bool f = false;
for (int y = 0; x + y <= 200; y++)
{
double a2 = Math.Round((100 * (double)x) / (x + y), MidpointRounding.AwayFromZero);
double b2 = Math.Round((100 * (double) y) / (x + y), MidpointRounding.AwayFromZero);
if (a == a2 && b == b2)
{
Console.WriteLine(x + y);
f = true;
break;
}
}
if (f) break;
}
}
}
}
No