結果
| 問題 | No.188 HAPPY DAY | 
| コンテスト | |
| ユーザー |  con | 
| 提出日時 | 2018-10-24 16:55:16 | 
| 言語 | Fortran (gFortran 14.2.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 1 ms / 1,000 ms | 
| コード長 | 869 bytes | 
| コンパイル時間 | 325 ms | 
| コンパイル使用メモリ | 32,128 KB | 
| 実行使用メモリ | 6,816 KB | 
| 最終ジャッジ日時 | 2024-11-19 05:29:08 | 
| 合計ジャッジ時間 | 654 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 1 | 
ソースコード
program calendar
implicit none
integer(8) a,b,c,i,y
y=0
do i=1,6
   if (i==2) then
      call twentyeight(b,y)
   else if (mod(i,2)==0) then
      call thirty(c,i,y)
   else
      call thirtyone(a,i,y)
   end if
end do
do i=7,12
   if (i==9) then
      call thirty(c,i,y)
   else if (i==11) then
      call thirty(c,i,y)
   else
      call thirtyone(a,i,y)
   end if
end do
write(*,*) y
end program calendar
subroutine twentyeight(b,y)
integer(8) i,x,b,y
b=28
do i=1,b
   x=int(i/10)+mod(i,10)
   if (x==2) then
      y=y+1
   end if
end do
end subroutine twentyeight
subroutine thirty(c,i,y)
integer(8) j,x,c,y,i
c=30
do j=1,c
   x=int(j/10)+mod(j,10)
   if (x==i) then
      y=y+1
   end if
end do
end subroutine 
subroutine thirtyone(a,i,y)
integer(8) j,x,a,y,i
a=31
do j=1,a
   x=int(j/10)+mod(j,10)
   if (x==i) then
      y=y+1
   end if
end do
end subroutine 
            
            
            
        