/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 1ms 540.0 KiB
#2 Wrong Answer 35ms 640.0 KiB

Code

#include<bits/stdc++.h>
using namespace std;
int main()
{

    int a;
    cin>>a;
    while(a--)
    {
        int n;
        cin>>n;
        int arr[n];
        vector<int>v;
        for(int i=0; i<n; i++)
        {
            cin>>arr[i];
            v.push_back(arr[i]);
        }
        int ans;
        for(int i=0; i<n; i=i+3)
        {
            ans=ans+(arr[i]*arr[i+1]*arr[i+2]);
        }
        cout<<ans<<endl;
    }
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1152 Special Array
Contest
Happy New Year 2025
Language
C++17 (G++ 13.2.0)
Submit At
2025-01-02 15:19:23
Judged At
2025-01-02 15:19:23
Judged By
Score
0
Total Time
35ms
Peak Memory
640.0 KiB