From 6a6bb73ed23d0629a0bb61b3ba3572467b3dfe84 Mon Sep 17 00:00:00 2001 From: Kirito <1362050620@qq.com> Date: Wed, 31 May 2017 10:08:57 +0800 Subject: [PATCH] Create 2415_doctor_godder.cpp From http://blog.csdn.net/doctor_godder/article/details/47727287 --- LuoGu/2415_doctor_godder.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 LuoGu/2415_doctor_godder.cpp diff --git a/LuoGu/2415_doctor_godder.cpp b/LuoGu/2415_doctor_godder.cpp new file mode 100644 index 0000000..489d978 --- /dev/null +++ b/LuoGu/2415_doctor_godder.cpp @@ -0,0 +1,22 @@ +#include +#include +#include +using namespace std; +double sum=0,sum1=0; +int a[1100],num=0; +int main() +{ + while (cin>>a[++num]) + { + /*for (int i=1;i<=num-1;++i) + if (a[i]==a[num]) + { + --num; + break; + }*/ + } + --num; + for (int i=1;i<=num;++i) sum1+=a[i]; + printf("%0.0lf",sum1*pow(2,num-1)); + return 0; +}