Advertisement
rayated

vodox

Dec 11th, 2019
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.18 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. int main()
  3. {
  4.     int n,a,b;
  5.     scanf("%d",&n);
  6.     if(n%3!=0) printf("%d\n",((n-1)/3)*8+(n%3)+1);
  7.     else printf("%d\n",((n-1)/3)*8+4);
  8.     return 0;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement