結果
| 問題 |
No.250 atetubouのzetubou
|
| コンテスト | |
| ユーザー |
jj
|
| 提出日時 | 2016-08-06 22:10:20 |
| 言語 | Fortran (gFortran 14.2.0) |
| 結果 |
AC
|
| 実行時間 | 11 ms / 5,000 ms |
| コード長 | 773 bytes |
| コンパイル時間 | 246 ms |
| コンパイル使用メモリ | 31,232 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-07 04:21:50 |
| 合計ジャッジ時間 | 1,168 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 20 |
ソースコード
subroutine submit(N,R,T)
integer*8::i,j,res
integer*8,intent(in)::N,R,T
res = 1
j = N
do i=1, R
res = (res*j)/i
j = j - 1
if(res.gt.T) then
exit
end if
end do
if(res.gt.T) then
print '(a)', "ZETUBOU"
else
print '(a)', "AC"
end if
end subroutine submit
program main
interface
subroutine submit(N,R,T)
integer*8,intent(in)::N,R,T
end subroutine submit
end interface
type problem
integer*8::D,X,T
end type problem
integer*8::Q,i,j,k,tmp
integer*8::qd,qx,qt,qr
type(problem)::P(10**4)
integer*8::D,T
read *, Q
read *, P(1:Q)
do i=1,Q
qd = P(i)%D
qx = P(i)%X
qt = P(i)%T
qr = MIN(qx, qd-1)
call submit(qd+qx-1,qr, qt)
end do
end program main
jj