/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 1ms 532.0 KiB
#2 Wrong Answer 1ms 340.0 KiB

Code

#include <bits/stdc++.h>
using namespace std;

int main() {
    int n;
    cin >> n;

    vector<int> A(n);
    for (int i = 0; i < n; i++) {
        cin >> A[i];
    }

    int total = 0;
    for (int i = 0; i < n; i++) {
        total += A[i];
    }

    cout << total << endl;

    if (n % 2 == 0) {
       
        cout << total * n << endl;
    } 
    else if (n == 1) {
    
        cout << n << endl;
    } 
    else {
       
        cout << total * (n + 1) << endl;
    }

    return 0;
}

Information

Submit By
Type
Submission
Problem
P1105 Ohh that gcd again
Contest
LUCC Presents Intra LU Junior Programming Contest - Replay
Language
C++11 (G++ 13.2.0)
Submit At
2025-09-02 17:18:48
Judged At
2025-09-02 17:18:48
Judged By
Score
0
Total Time
1ms
Peak Memory
532.0 KiB