Example #1
0
        public static decimal NextDecimal(bool acceptAnyDecimalSeparator = true)
        {
            string token = Cin.NextToken();

            if (acceptAnyDecimalSeparator)
            {
                token = token.Replace(',', '.');
                decimal result = decimal.Parse(token, CultureInfo.InvariantCulture);
                return(result);
            }
            else
            {
                decimal result = decimal.Parse(token);
                return(result);
            }
        }
Example #2
0
        public static long NL()
        {
            string token = Cin.NextToken();

            return(long.Parse(token));
        }
Example #3
0
        public static int NI()
        {
            string token = Cin.NextToken();

            return(int.Parse(token));
        }