답안 #517790

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
517790 2022-01-23T07:28:20 Z thegrimbee Palindromic FizzBuzz (NOI19_palindrome) C++14
32 / 100
12 ms 848 KB
#include <bits/stdc++.h>
#define int long long
using namespace std;
bool check(string s){
	for (int i = 0; i < s.size() / 2; ++i){
		if (s[i] != s[s.size()-1])return false;
	}
	return true;
}
signed main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int S, E;
	cin >> S >> E;
	for (int i = S; i <=E; ++i){
		if (check(to_string(i)))cout << "Palindrome!\n";
		else cout << i << '\n';
	}
		
		
		
		

}

Compilation message

palindrome.cpp: In function 'bool check(std::string)':
palindrome.cpp:5:20: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    5 |  for (int i = 0; i < s.size() / 2; ++i){
      |                  ~~^~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 448 KB Output is correct
2 Correct 1 ms 296 KB Output is correct
3 Correct 1 ms 208 KB Output is correct
4 Correct 1 ms 316 KB Output is correct
5 Correct 1 ms 208 KB Output is correct
6 Correct 1 ms 208 KB Output is correct
7 Correct 1 ms 208 KB Output is correct
8 Correct 1 ms 208 KB Output is correct
9 Correct 1 ms 256 KB Output is correct
10 Correct 1 ms 208 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 448 KB Output is correct
2 Correct 1 ms 296 KB Output is correct
3 Correct 1 ms 208 KB Output is correct
4 Correct 1 ms 316 KB Output is correct
5 Correct 1 ms 208 KB Output is correct
6 Correct 1 ms 208 KB Output is correct
7 Correct 1 ms 208 KB Output is correct
8 Correct 1 ms 208 KB Output is correct
9 Correct 1 ms 256 KB Output is correct
10 Correct 1 ms 208 KB Output is correct
11 Correct 1 ms 320 KB Output is correct
12 Correct 1 ms 316 KB Output is correct
13 Correct 1 ms 208 KB Output is correct
14 Correct 1 ms 208 KB Output is correct
15 Correct 1 ms 316 KB Output is correct
16 Correct 1 ms 208 KB Output is correct
17 Correct 1 ms 320 KB Output is correct
18 Correct 1 ms 208 KB Output is correct
19 Correct 2 ms 208 KB Output is correct
20 Correct 1 ms 320 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 448 KB Output is correct
2 Correct 1 ms 296 KB Output is correct
3 Correct 1 ms 208 KB Output is correct
4 Correct 1 ms 316 KB Output is correct
5 Correct 1 ms 208 KB Output is correct
6 Correct 1 ms 208 KB Output is correct
7 Correct 1 ms 208 KB Output is correct
8 Correct 1 ms 208 KB Output is correct
9 Correct 1 ms 256 KB Output is correct
10 Correct 1 ms 208 KB Output is correct
11 Correct 1 ms 320 KB Output is correct
12 Correct 1 ms 316 KB Output is correct
13 Correct 1 ms 208 KB Output is correct
14 Correct 1 ms 208 KB Output is correct
15 Correct 1 ms 316 KB Output is correct
16 Correct 1 ms 208 KB Output is correct
17 Correct 1 ms 320 KB Output is correct
18 Correct 1 ms 208 KB Output is correct
19 Correct 2 ms 208 KB Output is correct
20 Correct 1 ms 320 KB Output is correct
21 Correct 1 ms 208 KB Output is correct
22 Correct 1 ms 208 KB Output is correct
23 Correct 1 ms 208 KB Output is correct
24 Correct 1 ms 208 KB Output is correct
25 Correct 1 ms 208 KB Output is correct
26 Correct 1 ms 312 KB Output is correct
27 Correct 1 ms 208 KB Output is correct
28 Correct 1 ms 312 KB Output is correct
29 Correct 1 ms 316 KB Output is correct
30 Correct 1 ms 316 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 448 KB Output is correct
2 Correct 1 ms 296 KB Output is correct
3 Correct 1 ms 208 KB Output is correct
4 Correct 1 ms 316 KB Output is correct
5 Correct 1 ms 208 KB Output is correct
6 Correct 1 ms 208 KB Output is correct
7 Correct 1 ms 208 KB Output is correct
8 Correct 1 ms 208 KB Output is correct
9 Correct 1 ms 256 KB Output is correct
10 Correct 1 ms 208 KB Output is correct
11 Correct 1 ms 320 KB Output is correct
12 Correct 1 ms 316 KB Output is correct
13 Correct 1 ms 208 KB Output is correct
14 Correct 1 ms 208 KB Output is correct
15 Correct 1 ms 316 KB Output is correct
16 Correct 1 ms 208 KB Output is correct
17 Correct 1 ms 320 KB Output is correct
18 Correct 1 ms 208 KB Output is correct
19 Correct 2 ms 208 KB Output is correct
20 Correct 1 ms 320 KB Output is correct
21 Correct 1 ms 208 KB Output is correct
22 Correct 1 ms 208 KB Output is correct
23 Correct 1 ms 208 KB Output is correct
24 Correct 1 ms 208 KB Output is correct
25 Correct 1 ms 208 KB Output is correct
26 Correct 1 ms 312 KB Output is correct
27 Correct 1 ms 208 KB Output is correct
28 Correct 1 ms 312 KB Output is correct
29 Correct 1 ms 316 KB Output is correct
30 Correct 1 ms 316 KB Output is correct
31 Incorrect 12 ms 848 KB Output isn't correct
32 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 448 KB Output is correct
2 Correct 1 ms 296 KB Output is correct
3 Correct 1 ms 208 KB Output is correct
4 Correct 1 ms 316 KB Output is correct
5 Correct 1 ms 208 KB Output is correct
6 Correct 1 ms 208 KB Output is correct
7 Correct 1 ms 208 KB Output is correct
8 Correct 1 ms 208 KB Output is correct
9 Correct 1 ms 256 KB Output is correct
10 Correct 1 ms 208 KB Output is correct
11 Incorrect 1 ms 260 KB Output isn't correct
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 448 KB Output is correct
2 Correct 1 ms 296 KB Output is correct
3 Correct 1 ms 208 KB Output is correct
4 Correct 1 ms 316 KB Output is correct
5 Correct 1 ms 208 KB Output is correct
6 Correct 1 ms 208 KB Output is correct
7 Correct 1 ms 208 KB Output is correct
8 Correct 1 ms 208 KB Output is correct
9 Correct 1 ms 256 KB Output is correct
10 Correct 1 ms 208 KB Output is correct
11 Correct 1 ms 320 KB Output is correct
12 Correct 1 ms 316 KB Output is correct
13 Correct 1 ms 208 KB Output is correct
14 Correct 1 ms 208 KB Output is correct
15 Correct 1 ms 316 KB Output is correct
16 Correct 1 ms 208 KB Output is correct
17 Correct 1 ms 320 KB Output is correct
18 Correct 1 ms 208 KB Output is correct
19 Correct 2 ms 208 KB Output is correct
20 Correct 1 ms 320 KB Output is correct
21 Correct 1 ms 208 KB Output is correct
22 Correct 1 ms 208 KB Output is correct
23 Correct 1 ms 208 KB Output is correct
24 Correct 1 ms 208 KB Output is correct
25 Correct 1 ms 208 KB Output is correct
26 Correct 1 ms 312 KB Output is correct
27 Correct 1 ms 208 KB Output is correct
28 Correct 1 ms 312 KB Output is correct
29 Correct 1 ms 316 KB Output is correct
30 Correct 1 ms 316 KB Output is correct
31 Incorrect 12 ms 848 KB Output isn't correct
32 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 448 KB Output is correct
2 Correct 1 ms 296 KB Output is correct
3 Correct 1 ms 208 KB Output is correct
4 Correct 1 ms 316 KB Output is correct
5 Correct 1 ms 208 KB Output is correct
6 Correct 1 ms 208 KB Output is correct
7 Correct 1 ms 208 KB Output is correct
8 Correct 1 ms 208 KB Output is correct
9 Correct 1 ms 256 KB Output is correct
10 Correct 1 ms 208 KB Output is correct
11 Correct 1 ms 320 KB Output is correct
12 Correct 1 ms 316 KB Output is correct
13 Correct 1 ms 208 KB Output is correct
14 Correct 1 ms 208 KB Output is correct
15 Correct 1 ms 316 KB Output is correct
16 Correct 1 ms 208 KB Output is correct
17 Correct 1 ms 320 KB Output is correct
18 Correct 1 ms 208 KB Output is correct
19 Correct 2 ms 208 KB Output is correct
20 Correct 1 ms 320 KB Output is correct
21 Correct 1 ms 208 KB Output is correct
22 Correct 1 ms 208 KB Output is correct
23 Correct 1 ms 208 KB Output is correct
24 Correct 1 ms 208 KB Output is correct
25 Correct 1 ms 208 KB Output is correct
26 Correct 1 ms 312 KB Output is correct
27 Correct 1 ms 208 KB Output is correct
28 Correct 1 ms 312 KB Output is correct
29 Correct 1 ms 316 KB Output is correct
30 Correct 1 ms 316 KB Output is correct
31 Incorrect 12 ms 848 KB Output isn't correct
32 Halted 0 ms 0 KB -