結果

問題 No.745 letinopia raoha
ユーザー ohreitetsuohreitetsu
提出日時 2018-10-20 19:54:27
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 493 bytes
コンパイル時間 750 ms
コンパイル使用メモリ 67,828 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-12 05:19:23
合計ジャッジ時間 1,510 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,384 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 1 ms
4,384 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,384 KB
testcase_07 AC 1 ms
4,384 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <math.h>
using namespace std;
int main(int argc, char* argv[])
{
	int A,B,C,D;
	int count=0;
	int aV=100;
	int bV=50;
	int dV=-100;
	cin>>A>>B>>C>>D;
	if (D*100>=1000){
		cout<<"Impossible"<<endl;
		return 0;
	}
	int Sum=0;
	int n2;
	int i;
	for (i=1;i<=B;i++){
		n2=pow(2.0,(double)(count/100));
		Sum+=bV*n2;
		count++;
	}
	for (i=1;i<=A;i++){
		n2=pow(2.0,(double)(count/100));
		Sum+=aV*n2;
		count++;
	}
	cout<<"Possible"<<endl;
	cout<<Sum<<endl;
	return 0;
}
0