Forth (gforth), 91(削除) 91 (削除ここまで)86 bytes
: d { n } 0 n 1 do n i mod 0= i * -1 * + loop ;
: f { a b } a b = 1+ a d b = b d a = * * ;
Forth (gforth) No Locals, 94 bytes
A more "Forthy" version that doesn't use local variables
: d 0 over 1 do over i mod 0= i * - loop nip ;
: f 2dup = 1+ -rot 2dup d -rot d = -rot = * * ;
Forth (gforth), 91 bytes
: d { n } 0 n 1 do n i mod 0= i * -1 * + loop ;
: f { a b } a b = 1+ a d b = b d a = * * ;
Forth (gforth) No Locals, 94 bytes
A more "Forthy" version that doesn't use local variables
: d 0 over 1 do over i mod 0= i * - loop nip ;
: f 2dup = 1+ -rot 2dup d -rot d = -rot = * * ;
Forth (gforth), (削除) 91 (削除ここまで)86 bytes
: d { n } 0 n 1 do n i mod 0= i * - loop ;
: f { a b } a b = 1+ a d b = b d a = * * ;
Forth (gforth) No Locals, 94 bytes
A more "Forthy" version that doesn't use local variables
: d 0 over 1 do over i mod 0= i * - loop nip ;
: f 2dup = 1+ -rot 2dup d -rot d = -rot = * * ;
Forth (gforth), 91 bytes
: d { n } 0 n 1 do n i mod 0= i * -1 * + loop ;
: f { a b } a b = 1+ a d b = b d a = * * ;
Forth (gforth) No Locals, 94 bytes
A more "Forthy" version that doesn't use local variables
: d 0 over 1 do over i mod 0= i * - loop nip ;
: f 2dup = 1+ -rot 2dup d -rot d = -rot = * * ;