結果

問題 No.745 letinopia raoha
ユーザー Mcpu3
提出日時 2018-10-19 23:19:43
言語 Java
(openjdk 23)
結果
AC  
実行時間 148 ms / 2,000 ms
コード長 527 bytes
コンパイル時間 2,253 ms
コンパイル使用メモリ 76,224 KB
実行使用メモリ 41,784 KB
最終ジャッジ日時 2024-11-18 22:32:54
合計ジャッジ時間 4,311 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt(), B = sc.nextInt(), C = sc.nextInt(), D = sc.nextInt(), ans = 0, i = 0;
		sc.close();
		if (D == 10) System.out.print("Impossible");
		else {
			while (B > 0) {
				ans += (int)Math.pow(2, i / 100) * 50;
				--B;
				++i;
			}
			while (A > 0) {
				ans += (int)Math.pow(2, i / 100) * 100;
				--A;
				++i;
			}
			System.out.print("Possible\n" + ans);
		}
	}
}
0