NGM Solution

#include <stdio.h>
#include <stdlib.h>

#define DEBUG 0

int main ( int argc ,char * argv[] ) {

	long long int n;
	scanf("%lld" , &n);
	switch ( n % 10 ) {
		case 0:
			printf("2\n");
			break;
		default:
			printf("1\n");
			printf("%lld\n" , n % 10);
			break;
	}

	return 0;
}

470+ Solutions to various Programming Questions

If you like what you read subscribe to my newsletter.

I write essays on various engineering topics and share it through my weekly newsletter 👇