結果
問題 | No.745 letinopia raoha |
ユーザー |
|
提出日時 | 2018-11-23 15:18:11 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 595 bytes |
コンパイル時間 | 657 ms |
コンパイル使用メモリ | 53,748 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-24 18:10:45 |
合計ジャッジ時間 | 1,275 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 8 |
ソースコード
#include<iostream> using namespace std; int main() { int a,b,c,d; cin >> a; cin >> b; cin >> c; cin >> d; if (d >= 10){ cout << "Impossible\n"; return 0; } cout << "Possible\n"; int f = 1; long score = 0; while (b >= 100){ score += 100 * 50 * f; b -= 100; f *= 2; } score += b * 50 * f; score += (100 - b) * 100 * f; a -= (100 - b); f *= 2; while (a >= 100){ score += 100 * 100 * f; a-= 100; f *= 2; } score += a * 100 * f; cout << score << "\n"; }