結果
問題 |
No.338 アンケート機能
|
ユーザー |
![]() |
提出日時 | 2016-12-09 20:26:33 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 610 bytes |
コンパイル時間 | 2,266 ms |
コンパイル使用メモリ | 74,492 KB |
実行使用メモリ | 54,244 KB |
最終ジャッジ日時 | 2024-11-28 19:45:35 |
合計ジャッジ時間 | 7,772 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 WA * 1 |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int up=201; int min = Integer.MAX_VALUE; for(int i=0; i<up; i++){ for(int j=0; j<up; j++){ int x = (int)Math.round(i/(double)(i+j)*100); int y = (int)Math.round(j/(double)(i+j)*100); if(x==A && y==B){ min=Math.min(min,i+j); } } } System.out.println(min); } }