kyuridenamida's blog

By kyuridenamida, 10 years ago, In English

Hello. Do you know the Fairfield's congruence?

Firstly, if m is 1 or 2, compute y=y-1,m=m+12. Then calculating this formula, you can get the number of days between an arbitrary date and 01/01/0001.

In Japan, this formula is known as the Fairfield's congruence, but I have never seen the foreign people who have been talking about it.

It is mentioned in only the Japanese Wikipedia's page of "Zeller's congruence" below. http://ja.wikipedia.org/wiki/%E3%83%84%E3%82%A7%E3%83%A9%E3%83%BC%E3%81%AE%E5%85%AC%E5%BC%8F

Do you know who Fairfield is? I don't know.

Do you know a famous formula like the Fairfield's congruence?

Full text and comments »

  • Vote: I like it
  • +29
  • Vote: I do not like it

By kyuridenamida, 13 years ago, In English
#Who=*ABCDE
82kyuridenamida2960+4 / -147400:1391200:22122400:46-1
As a result , my rate about 100 increased!! I reached to div1!

By the way ... I committed a serious mistake in problem D ;(

I set program to output -1 in n=2 case.
But, the program didn't exit program after that.

So, I got WA.
------------------------
Expected:
-1

Outptut:
-1
6
3
------------------------

*Methods to solve

[A] I only used the Python:)
 Actually, input is "positive integer". <- damn!

[B] Simulation. I only did.

[C] I made tree with using <map> and <set>
do counting folder and files that starts at all one-depth folders , and get maximum.

[D] Look at the method image(n=5) I did this method , and used the bigInteger.  
This method is not effective.
[E]  Unread.

*Hacks

I succeeded 4 hacks. (Problem D Case: n=2)

Sorry my bad English.

Full text and comments »

  • Vote: I like it
  • +36
  • Vote: I do not like it