# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
339938 | 2020-12-26T11:43:44 Z | ArKCa | Pot (COCI15_pot) | C++17 | 1 ms | 364 KB |
#include<bits/stdc++.h> #define N 200005 #define ll long long #define int ll #define N 200005 using namespace std; int n,sum,a; int fp(int x,int y){ if(y==1)return x; if(y==0)return 1; int a=fp(x,y/2); if(y%2)return a*a*x; return a*a; } int32_t main(){ // freopen("a.gir","r",stdin); // freopen("a.cik","w",stdout); scanf("%lld",&n); while(n--){ scanf("%lld",&a); sum+=fp((int)a/10,(int)a%10); // printf("%lld %lld %lld\n", (int)a/10,(int)a%10 ,sum); } printf("%lld\n", sum); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Output is correct |
2 | Correct | 1 ms | 364 KB | Output is correct |
3 | Correct | 1 ms | 364 KB | Output is correct |
4 | Correct | 1 ms | 364 KB | Output is correct |
5 | Correct | 1 ms | 364 KB | Output is correct |
6 | Correct | 1 ms | 364 KB | Output is correct |
7 | Correct | 1 ms | 364 KB | Output is correct |
8 | Correct | 1 ms | 364 KB | Output is correct |
9 | Correct | 1 ms | 364 KB | Output is correct |
10 | Correct | 1 ms | 364 KB | Output is correct |