結果

問題 No.745 letinopia raoha
ユーザー tsunabittsunabit
提出日時 2019-07-08 00:05:04
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 616 bytes
コンパイル時間 3,114 ms
コンパイル使用メモリ 75,732 KB
実行使用メモリ 54,328 KB
最終ジャッジ日時 2024-04-15 18:43:32
合計ジャッジ時間 4,974 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
41,608 KB
testcase_01 AC 121 ms
54,272 KB
testcase_02 AC 113 ms
53,128 KB
testcase_03 AC 119 ms
53,936 KB
testcase_04 AC 122 ms
54,328 KB
testcase_05 AC 122 ms
53,736 KB
testcase_06 AC 122 ms
54,296 KB
testcase_07 AC 126 ms
53,864 KB
testcase_08 AC 122 ms
54,096 KB
testcase_09 AC 125 ms
53,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
import java.math.*;

public class No745 {
    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();
    	int o = 0 , k = 0;
    	if(d >= 10) {
    		System.out.println("Impossible");
    		return;
    	}
    	
    	for(int i = 0; i < b; i++) {
    		o += (int)Math.pow(2, i / 100) * 50;
    	}
    	for(int i = b; i < a + b; i++) {
    		o += (int)Math.pow(2, i / 100) * 100;
    	}
    	
    	System.out.println("Possible");
    	System.out.println(o);
    	
    }
}
0