Submission #339938

#TimeUsernameProblemLanguageResultExecution timeMemory
339938ArKCaPot (COCI15_pot)C++17
50 / 50
1 ms364 KiB
#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 (stderr)

pot.cpp: In function 'int32_t main()':
pot.cpp:20:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   20 |  scanf("%lld",&n);
      |  ~~~~~^~~~~~~~~~~
pot.cpp:22:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   22 |   scanf("%lld",&a);
      |   ~~~~~^~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...