Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _USE_MATH_DEFINES
- #include <iostream>
- #include <conio.h>
- #include <string>
- #include <set>
- #include <map>
- #include <algorithm>
- #include <string>
- #include <math.h>
- #include <vector>
- #include <cmath>
- #include <sstream>
- #include <queue>
- using namespace std;
- int main()
- {
- char pht;
- int s = 0;
- while (cin >> pht)
- {
- s = +(int)pht - '0';
- }
- if (s % 3 == 0)
- cout << 2 << endl;
- else
- {
- cout << 1 << endl;
- cout << s % 3;
- }
- _getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment