제출 #45496

#제출 시각아이디문제언어결과실행 시간메모리
45496IvanCPalindromes (info1cup18_palindromes)C++17
100 / 100
984 ms564 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
	ll soma = 0;
	int N;
	scanf("%d",&N);
	for(int vez = 1;vez<=N;vez++){
		int x,copia;
		vector<int> V,U;
		scanf("%d",&x);
		copia = x;
		while(x != 0){
			V.push_back(x % 10);
			U.push_back(x % 10);
			x /= 10;
		}
		reverse(U.begin(),U.end());
		if(V == U) soma += copia;
	}
	printf("%lld\n",soma);
	return 0;
}

컴파일 시 표준 에러 (stderr) 메시지

palindromes.cpp: In function 'int main()':
palindromes.cpp:7:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&N);
  ~~~~~^~~~~~~~~
palindromes.cpp:11:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d",&x);
   ~~~~~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...