Submission #531977
Source Code Expand
#include "bits/stdc++.h"
#pragma warning(disable : 4996)
using namespace std;
int main(){
int N;
long long sum=0;
int A;
cin >> N;
for(int i=1;i<=N;i++){
cin >> A;
sum += A*pow(2,N-i);
}
cout << sum << endl;
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - とても長い数列 |
| User | kayu |
| Language | C++ (GCC 4.9.2) |
| Score | 100 |
| Code Size | 251 Byte |
| Status | AC |
| Exec Time | 28 ms |
| Memory | 928 KiB |
Judge Result
| Set Name | Sample | DataSet1 | DataSet2 | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 60 / 60 | 40 / 40 | ||||||
| Status |
|
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample-01.txt, sample-02.txt, sample-03.txt |
| DataSet1 | sample-01, sample-02, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt |
| DataSet2 | sample-01.txt, sample-02.txt, sample-03.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 02-01.txt, 02-02.txt, 02-03.txt, 02-04.txt, 02-05.txt, 02-06.txt, 02-07.txt, 02-08.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 01-01.txt | AC | 26 ms | 800 KiB |
| 01-02.txt | AC | 24 ms | 800 KiB |
| 01-03.txt | AC | 24 ms | 668 KiB |
| 01-04.txt | AC | 23 ms | 672 KiB |
| 01-05.txt | AC | 24 ms | 924 KiB |
| 01-06.txt | AC | 25 ms | 792 KiB |
| 01-07.txt | AC | 25 ms | 796 KiB |
| 01-08.txt | AC | 26 ms | 808 KiB |
| 02-01.txt | AC | 23 ms | 924 KiB |
| 02-02.txt | AC | 26 ms | 672 KiB |
| 02-03.txt | AC | 23 ms | 796 KiB |
| 02-04.txt | AC | 27 ms | 912 KiB |
| 02-05.txt | AC | 24 ms | 800 KiB |
| 02-06.txt | AC | 24 ms | 924 KiB |
| 02-07.txt | AC | 26 ms | 672 KiB |
| 02-08.txt | AC | 24 ms | 668 KiB |
| sample-01.txt | AC | 23 ms | 928 KiB |
| sample-02.txt | AC | 28 ms | 800 KiB |
| sample-03.txt | AC | 25 ms | 720 KiB |