結果
問題 |
No.338 アンケート機能
|
ユーザー |
![]() |
提出日時 | 2017-07-08 23:09:08 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 933 bytes |
コンパイル時間 | 2,126 ms |
コンパイル使用メモリ | 103,040 KB |
実行使用メモリ | 18,176 KB |
最終ジャッジ日時 | 2024-10-06 20:14:54 |
合計ジャッジ時間 | 3,852 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 WA * 1 |
コンパイルメッセージ
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; y + x <= 200; y++) { double a2 = Math.Round((double)x / ((double)x + (double)y) * 100, MidpointRounding.AwayFromZero); double b2 = Math.Round((double)y / ((double)x + (double)y) * 100, MidpointRounding.AwayFromZero); if (a == a2 && b == b2) { Console.WriteLine(x + y); f = true; break; } } if (f) break; } } } }