結果
問題 | No.87 Advent Calendar Problem |
ユーザー |
![]() |
提出日時 | 2016-08-15 21:57:43 |
言語 | Fortran (gFortran 14.2.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 658 bytes |
コンパイル時間 | 1,039 ms |
コンパイル使用メモリ | 31,996 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-07 18:02:20 |
合計ジャッジ時間 | 1,200 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
function get_num(N) result(t)integer*8::N,tif(MOD(N,400).eq.0) thent = 2else if(MOD(N,100).eq.0) thent = 1else if(MOD(N,4).eq.0) thent = 2elset = 1end ifend function get_numprogram mainimplicit noneinterfacefunction get_num(N) result(t)integer*8::N,tend function get_numend interfaceinteger*8::N,M,i,youbi,onajiread *,NM = (N-2014)/400onaji = 0youbi = 0do i=2015,(N-M*400)youbi = MOD(youbi+get_num(i),7)if(youbi.eq.0) thenonaji = onaji + 1end if! print '(i0," ",i0)', i, youbiend doprint '(i0)', onaji + M*57end program main