| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 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;
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
