Submission #713803

# Submission time Handle Problem Language Result Execution time Memory
713803 2023-03-23T05:04:13 Z Dulguun88 Pot (COCI15_pot) C++14
45 / 50
1000 ms 300 KB
#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

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 time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 296 KB Output is correct
3 Execution timed out 1083 ms 212 KB Time limit exceeded
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 300 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 0 ms 296 KB Output is correct
10 Correct 0 ms 212 KB Output is correct