結果

問題 No.434 占い
ユーザー jjjj
提出日時 2016-10-14 23:06:29
言語 Fortran
(gFortran 13.2.0)
結果
TLE  
実行時間 -
コード長 594 bytes
コンパイル時間 1,492 ms
コンパイル使用メモリ 32,248 KB
実行使用メモリ 13,760 KB
最終ジャッジ日時 2024-05-02 00:52:03
合計ジャッジ時間 4,645 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
13,760 KB
testcase_01 AC 1 ms
6,944 KB
testcase_02 AC 1 ms
6,944 KB
testcase_03 AC 1 ms
6,944 KB
testcase_04 AC 1 ms
6,944 KB
testcase_05 AC 1 ms
6,940 KB
testcase_06 AC 9 ms
6,944 KB
testcase_07 AC 2 ms
6,944 KB
testcase_08 AC 207 ms
6,944 KB
testcase_09 AC 22 ms
6,944 KB
testcase_10 AC 4 ms
6,944 KB
testcase_11 AC 10 ms
6,940 KB
testcase_12 AC 78 ms
6,944 KB
testcase_13 AC 189 ms
6,944 KB
testcase_14 AC 24 ms
6,944 KB
testcase_15 TLE -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

program main
  implicit none
  integer::T,i,j,len
  character*100000::S
  integer::ss(100000)
  read *,T
  do i=1,T
     read *,S
     len = LEN_TRIM(S)
     do j=1,len
        ss(j) = ICHAR(S(j:j))-ICHAR('0')
     end do
     call uranai(ss, len)
  end do
contains
  subroutine uranai(ss, len)
    integer::ss(100000)
    integer::len,i,j,tmp
    do i=1,len-1
       do j=1,len-i
          ss(j) = ss(j) + ss(j+1)
          if(ss(j).ge.10) then
             ss(j) = ss(j)/10 + ss(j)-10
          end if
       end do
    end do
    print '(i0)', ss(1)
  end subroutine uranai
end program main
0