using System.Linq;
using System.Collections.Generic;
using System;

namespace Wandbox
{
    class Program
    {
        static void Main(string[] args)
        {
            var QMf2JIs682QIjWyBsYlmtV9rM1UcMKqKXRhSfmaSEKPIx65EvBB4gw3BEbVdM9WfTnyQzwzsTm = int.Parse(Console.ReadLine());
            if (QMf2JIs682QIjWyBsYlmtV9rM1UcMKqKXRhSfmaSEKPIx65EvBB4gw3BEbVdM9WfTnyQzwzsTm == 0)
                return;
            var fqGPa2NTmP4uUVKmIBBymrGYg74ZaT95YdfZt0CcPoD3aufikHBBUjKuZyb9bkrMLVFUapL = Console.ReadLine().Split(' ').Select(Exm4jfV1CjTb97xF76ThB4vvSIisBPkNj9QDPmPdcqNHmiB1mvwUQmH9u0ez0o9ZyVInvaVh9xV => double.Parse(Exm4jfV1CjTb97xF76ThB4vvSIisBPkNj9QDPmPdcqNHmiB1mvwUQmH9u0ez0o9ZyVInvaVh9xV)).ToArray();
            var B6AyTWGuXEGtaq4yfU0CAOBcgPpgljO4OeSYoI17dIu7WLdfUiV2k3cy8KveNfnimW7CuhDst = Console.ReadLine().Split(' ').Select(EOhwzueUp4MMflg6bmKwrd8LWqIlQZkWkkwiAXfR2V6XZX8opaE39NWXuQn06XxX5caHN8Lu => double.Parse(EOhwzueUp4MMflg6bmKwrd8LWqIlQZkWkkwiAXfR2V6XZX8opaE39NWXuQn06XxX5caHN8Lu)).ToArray();
            var Fm40EOk93mvakFi6KVWPMVew5533LMNAzcVAQ73mMOybHLLYTttm86bwoUf1UkGJJJIkIEOFus = 0.0;
            var LoDzSA3Sh07j4eNx5SxLv63p4yZkGdvBZ3PhOZFD2e97xhNDc8MAx89dQc3KfjCLsQI56DjYVu = 0.0;
            var xls0YNBdGGZBh6uUvxF7zNPBu2RB1oBmmJuNoewJA6fG0W2Cu9qQMWBD0te4Sob0Fm6QljqCfV = 0.0;
            var KUaHA7e7rdaSzXl22QRa0i6jTNy2gOIXeGE5k80HKD1hhBKK33TRnBvATHCqRWKofLrT8rw6 = 0.0;

            for (int i = 0; i < fqGPa2NTmP4uUVKmIBBymrGYg74ZaT95YdfZt0CcPoD3aufikHBBUjKuZyb9bkrMLVFUapL.Length; i++)
            {
                Fm40EOk93mvakFi6KVWPMVew5533LMNAzcVAQ73mMOybHLLYTttm86bwoUf1UkGJJJIkIEOFus += Math.Abs(fqGPa2NTmP4uUVKmIBBymrGYg74ZaT95YdfZt0CcPoD3aufikHBBUjKuZyb9bkrMLVFUapL[i] - B6AyTWGuXEGtaq4yfU0CAOBcgPpgljO4OeSYoI17dIu7WLdfUiV2k3cy8KveNfnimW7CuhDst[i]);
                LoDzSA3Sh07j4eNx5SxLv63p4yZkGdvBZ3PhOZFD2e97xhNDc8MAx89dQc3KfjCLsQI56DjYVu += (fqGPa2NTmP4uUVKmIBBymrGYg74ZaT95YdfZt0CcPoD3aufikHBBUjKuZyb9bkrMLVFUapL[i] - B6AyTWGuXEGtaq4yfU0CAOBcgPpgljO4OeSYoI17dIu7WLdfUiV2k3cy8KveNfnimW7CuhDst[i]) * (fqGPa2NTmP4uUVKmIBBymrGYg74ZaT95YdfZt0CcPoD3aufikHBBUjKuZyb9bkrMLVFUapL[i] - B6AyTWGuXEGtaq4yfU0CAOBcgPpgljO4OeSYoI17dIu7WLdfUiV2k3cy8KveNfnimW7CuhDst[i]);
                xls0YNBdGGZBh6uUvxF7zNPBu2RB1oBmmJuNoewJA6fG0W2Cu9qQMWBD0te4Sob0Fm6QljqCfV += Math.Abs((fqGPa2NTmP4uUVKmIBBymrGYg74ZaT95YdfZt0CcPoD3aufikHBBUjKuZyb9bkrMLVFUapL[i] - B6AyTWGuXEGtaq4yfU0CAOBcgPpgljO4OeSYoI17dIu7WLdfUiV2k3cy8KveNfnimW7CuhDst[i]) * (fqGPa2NTmP4uUVKmIBBymrGYg74ZaT95YdfZt0CcPoD3aufikHBBUjKuZyb9bkrMLVFUapL[i] - B6AyTWGuXEGtaq4yfU0CAOBcgPpgljO4OeSYoI17dIu7WLdfUiV2k3cy8KveNfnimW7CuhDst[i]) * (fqGPa2NTmP4uUVKmIBBymrGYg74ZaT95YdfZt0CcPoD3aufikHBBUjKuZyb9bkrMLVFUapL[i] - B6AyTWGuXEGtaq4yfU0CAOBcgPpgljO4OeSYoI17dIu7WLdfUiV2k3cy8KveNfnimW7CuhDst[i]));
                KUaHA7e7rdaSzXl22QRa0i6jTNy2gOIXeGE5k80HKD1hhBKK33TRnBvATHCqRWKofLrT8rw6 = Math.Max(Math.Abs(fqGPa2NTmP4uUVKmIBBymrGYg74ZaT95YdfZt0CcPoD3aufikHBBUjKuZyb9bkrMLVFUapL[i] - B6AyTWGuXEGtaq4yfU0CAOBcgPpgljO4OeSYoI17dIu7WLdfUiV2k3cy8KveNfnimW7CuhDst[i]), KUaHA7e7rdaSzXl22QRa0i6jTNy2gOIXeGE5k80HKD1hhBKK33TRnBvATHCqRWKofLrT8rw6);
            }
            Console.WriteLine(Fm40EOk93mvakFi6KVWPMVew5533LMNAzcVAQ73mMOybHLLYTttm86bwoUf1UkGJJJIkIEOFus);
            Console.WriteLine(Math.Pow(LoDzSA3Sh07j4eNx5SxLv63p4yZkGdvBZ3PhOZFD2e97xhNDc8MAx89dQc3KfjCLsQI56DjYVu, 1 / 2.0));
            Console.WriteLine(Math.Pow(xls0YNBdGGZBh6uUvxF7zNPBu2RB1oBmmJuNoewJA6fG0W2Cu9qQMWBD0te4Sob0Fm6QljqCfV, 1 / 3.0));
            Console.WriteLine(KUaHA7e7rdaSzXl22QRa0i6jTNy2gOIXeGE5k80HKD1hhBKK33TRnBvATHCqRWKofLrT8rw6);
        }
    }
}



Measured memory_bytes: 9984