結果
問題 | No.745 letinopia raoha |
ユーザー |
|
提出日時 | 2019-02-16 20:54:55 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 129 ms / 2,000 ms |
コード長 | 574 bytes |
コンパイル時間 | 3,569 ms |
コンパイル使用メモリ | 83,192 KB |
実行使用メモリ | 54,200 KB |
最終ジャッジ日時 | 2024-09-24 17:47:51 |
合計ジャッジ時間 | 5,645 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 8 |
ソースコード
import java.util.*; class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int d = sc.nextInt(); if (d >= 10) System.out.println("Impossible"); else { //AとBのみ int combo = 0; int score = 0; for (int i=0; i<b; i++) { score += Math.pow(2,combo/100)*50; combo++; } for (int i=0; i<a; i++) { score += Math.pow(2,combo/100)*100; combo++; } System.out.println("Possible"); System.out.println(score); } } }