結果

問題 No.87 Advent Calendar Problem
ユーザー cielciel
提出日時 2014-12-07 00:03:12
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 176 bytes
コンパイル時間 49 ms
コンパイル使用メモリ 11,460 KB
実行使用メモリ 23,832 KB
最終ジャッジ日時 2023-09-02 09:02:10
合計ジャッジ時間 12,517 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def zeller(_y,m,d)
	m+=1
	if m<4 then _y-=1;m+=12 end
	y=_y/100;z=_y%100
	(5*y+z+y/4+z/4+13*m/5+d-1)%7
end
p (2015..gets.to_i).count{|i|zeller(i,7,23)==zeller(2014,7,23)}
0