結果
| 問題 |
No.415 ぴょん
|
| ユーザー |
jj
|
| 提出日時 | 2016-08-26 22:42:47 |
| 言語 | Fortran (gFortran 14.2.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 365 bytes |
| コンパイル時間 | 1,104 ms |
| コンパイル使用メモリ | 30,848 KB |
| 実行使用メモリ | 788,736 KB |
| 最終ジャッジ日時 | 2024-11-08 09:38:13 |
| 合計ジャッジ時間 | 3,108 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 2 MLE * 1 -- * 23 |
ソースコード
program main
implicit none
integer*8::N,D,i,curr,next,total
integer,allocatable::ashiba(:)
read *,N,D
allocate(ashiba(0:D))
ashiba = 1
curr = 0
total = 0
do i=1,D
ashiba(curr) = 0
total = (N-curr)/D + total
next = MOD(curr+(N/D+1)*D,N)
if(ashiba(next).eq.0) exit
curr = next
end do
print '(i0)',total
end program main
jj