제출 #713803

#제출 시각아이디문제언어결과실행 시간메모리
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;
}

컴파일 시 표준 에러 (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...