結果
問題 |
No.339 何人が回答したのか
|
ユーザー |
![]() |
提出日時 | 2016-07-31 23:15:18 |
言語 | Fortran (gFortran 14.2.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 484 bytes |
コンパイル時間 | 201 ms |
コンパイル使用メモリ | 32,256 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-06 21:36:51 |
合計ジャッジ時間 | 1,717 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 61 |
ソースコード
recursive function gcd(a,b) result(c) integer::a,b,c if(b.eq.0) then c = a else c = gcd(b,MOD(a,b)) end if end function gcd program main interface recursive function gcd(a,b) result(c) integer::a,b,c end function gcd end interface integer::N,i,gcdvalue integer,allocatable::A(:) read *,N allocate(A(N)) read *,A gcdvalue = A(N) do i=N-1,1,-1 gcdvalue = gcd(A(i),gcdvalue) end do print '(i0)',100/gcdvalue end program main