Advertisement
Promi_38

cf 1451A

Jan 18th, 2021
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. int main()
  4. {
  5.     int t;
  6.     scanf("%d", &t);
  7.    
  8.     while(t--)
  9.     {
  10.         long long n;
  11.         scanf("%lld", &n);
  12.         if(n == 1) printf("0\n");
  13.         else if(n == 2) printf("1\n");
  14.         else if(n == 3) printf("2\n");
  15.         else if(n % 2 == 0) printf("2\n");
  16.         else printf("3\n");
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement