by@akouryy1
AC
520ms
c>1-:f ia*i+68b**-i~v v^?:p@ < >0fg3fg-3fp 0fg6fg-6fp 0fg9fg-9fpv v < >1fg4fg-4fp 1fg7fg-7fp 1fgafg-afpv v < >2fg5fg-5fp 2fg8fg-8fp 2fgbfg-bfpv v < >7fgbfg* 8fgafg* -3fg* 8fg9fg* 6fgbfg* -4fg* 6fgafg* 7fg9fg* -5fg* ++ 6,n;
46 18 60 80 58 29 54 62 06 13 72 04
7694