Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
#include
#include
using namespace std; int main() { int r,l,d,a,c=0,x,y,palindrom=0,rez=0,p; int b[10]; cin>>l>>r; for (int i=l;i<=r;i++) { p=i; a = 1; while (i>0) { d=i%10; if (d!=0 and p%d==0) { a=1; } else { a=0; break; } i/=10; } i=p; c=0; palindrom=0; while (i>0) { d=i%10; b[c] = d; c++; i/=10; } i=p; x=0; y=(c-1); while (x < y) { if (b[x] == b[y]){ x++; y--; } else{ palindrom++; break; } } if(a==1 or palindrom==0){ rez++; } } cout<
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)