Skip to content

Instantly share code, notes, and snippets.

@OmarJH
Created May 2, 2015 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OmarJH/8bea73dcf0d125854012 to your computer and use it in GitHub Desktop.
Save OmarJH/8bea73dcf0d125854012 to your computer and use it in GitHub Desktop.
ACM - NGM - A Game with Numbers - SPOJ
#include<iostream>
using namespace std;
int main()
{
int x;
cin >> x;
if (x % 10 == 0)
cout << 2 << endl;
else
cout << 1 << endl << x % 10 << endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment