Submission #713803

#TimeUsernameProblemLanguageResultExecution timeMemory
713803Dulguun88Pot (COCI15_pot)C++14
45 / 50
1083 ms300 KiB
#include <bits/stdc++.h> using namespace std; int main(){ unsigned long long int n,m,kk,ll,sum=0; cin>>n; for(unsigned long long int i=0 ; i<n ; i++){ cin>>m; kk=m/10; ll=m%10; m=kk; for(int j=0 ; j<ll-1 ;j++) kk*=m; sum+=kk; kk=0; } cout<<sum; }

Compilation message (stderr)

pot.cpp: In function 'int main()':
pot.cpp:11:21: warning: comparison of integer expressions of different signedness: 'int' and 'long long unsigned int' [-Wsign-compare]
   11 |      for(int j=0 ; j<ll-1 ;j++) kk*=m;
      |                    ~^~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...