Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main() {
- int a,b, flag = 0;
- scanf("%d %d", &a, &b);
- if (a <= 0 || b <= 0) {
- printf("Invalid input\n");
- } else {
- int tmp = a;
- if (a < b) {
- tmp = a;
- a = b;
- b = tmp;
- }
- a/=10;
- while (b && a) {
- if (a%10 == b%10) {
- b/=10;
- if (!b) {
- flag = 1;
- }
- }
- a/=100;
- }
- if(flag) {
- printf("PAREN!\n");
- } else {
- printf("NE!\n");
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement