mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
Create 2415_doctor_godder.cpp
From http://blog.csdn.net/doctor_godder/article/details/47727287
This commit is contained in:
parent
da6ba401ff
commit
6a6bb73ed2
22
LuoGu/2415_doctor_godder.cpp
Normal file
22
LuoGu/2415_doctor_godder.cpp
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
#include<cstdio>
|
||||||
|
#include<iostream>
|
||||||
|
#include<math.h>
|
||||||
|
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;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user