Advertisement
a53

albinute

a53
Sep 17th, 2017
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include <fstream>
  2. #define MOD 2018
  3. using namespace std;
  4. ifstream f("albinute.in");
  5. ofstream g("albinute.out");
  6.  
  7. int main()
  8. {
  9. unsigned long long int n,nrop;
  10. f>>n;
  11. if(n%2)
  12. nrop=0,n/=2;
  13. else
  14. nrop=n/2,n=n/2-1;
  15. nrop=nrop+n%MOD*(n+1)%MOD;
  16. g<<nrop%MOD;
  17. return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement