結果
| 問題 |
No.415 ぴょん
|
| ユーザー |
jj
|
| 提出日時 | 2016-08-26 22:39:40 |
| 言語 | Fortran (gFortran 14.2.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 352 bytes |
| コンパイル時間 | 1,412 ms |
| コンパイル使用メモリ | 31,360 KB |
| 実行使用メモリ | 788,488 KB |
| 最終ジャッジ日時 | 2024-11-08 09:35:57 |
| 合計ジャッジ時間 | 4,418 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 WA * 1 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
do i=1,D
ashiba(curr) = 0
total = (N-1)/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