Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- using namespace std;
- /*
- * n^m
- * 14^x
- */
- int ucPut(int n, int m)
- {
- return 0;
- }
- int ucFac(int n)
- {
- if(n == 0 || n == 1)
- return 1;
- if(n == 2)
- return 2;
- if(n == 3)
- return 6;
- if(n == 4)
- return 4;
- if(n >= 5)
- return 0;
- }
- int sol(int n, int m)
- {
- if(n >= 5)
- {
- int c = n % 10;
- if(c == 3 || c == 7)
- {
- if(m % 4 == 0)
- return 1;
- else
- return 0;
- }
- if(c == 9)
- {
- if(m % 2 == 0)
- return 1;
- else
- return 0;
- }
- }
- else
- {
- switch(n)
- {
- case 1:
- return 0;
- case 2:
- return 0;
- case 3:
- {
- if(m % 4 == 3)
- return 1;
- else
- return 0;
- }
- case 4:
- return 0;
- }
- }
- }
- int main()
- {
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement