| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1360812 | ozner77 | Palindrome-Free Numbers (BOI13_numbers) | C++17 | 1096 ms | 408 KiB |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
bool palin(string s){
for(int i=0;i<s.size();i++){
if(i>0){
if(s[i]==s[i-1]){
return true;
}
}
if(i>1){
if(s[i]==s[i-2]){
return true;
}
}
}
return false;
}
int main(){
ll a,b;
cin>>a>>b;
ll res=0;
for(int i=a;i<=b;i++){
if(palin(to_string(i))){
res++;
}
}
cout<<b-a+1-res;
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
