Alien Calendar

Alien Calendar

Problem Description

Remains of civilization have been found in the depths of a galaxy

  • The decimal system used for their counting
  • Their civilization also has a calendar. The calendar has only days and no concept of years and months.
  • The interesting thing is that they also use the concept of the week, but they contain 9 days a week
  • For convenience, here are respectively marked as A, B, C, D...I
  • The data shows that their 23rd is week E, 190th is week A, and 343251 is week I
  • Excitingly, they also met the day of the end of the world
  • Of course it is a big number: 651764141421415346185
  • Please judge what day it is

Thinking analysis
If you understand BigInteger, this question is a sub-question, check the mod method of BigInteger

BigInteger b=new BigInteger("651764141421415346185");
		BigInteger mod = b.mod(BigInteger.valueOf(9));
		System.out.println(mod.toString());

The result is 7

Guess you like

Origin blog.csdn.net/qq_45657198/article/details/113335036