답안 #866387

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
866387 2023-10-26T04:16:24 Z Tejas_Mondeeri Pot (COCI15_pot) C++14
50 / 50
0 ms 436 KB
// pot

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

#define ull unsigned long long
#define ll long long

void fn()
{
    // fstream myfile;
    // myfile.open("inp.txt", ios::in);
    int n, sol = 0;
    cin >> n;
    vector<int> nums(n);
    for (int i = 0; i < n; i++)
    {
        cin >> nums[i];
        int base = nums[i] / 10, p = nums[i] % 10;
        sol += pow(base, p);
    }
    cout << sol << endl;
}

int main()
{
    int t = 1;
    // cin>>t;
    while (t--)
        fn();
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 436 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct