using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Baekjoon
{
class Program
{
static void Main(string[] args)
{
string s = Console.ReadLine();
double result = 0;
foreach (char c in s)
{
double n = (int)Char.GetNumericValue(c);
result += Math.Pow(n, 5);
}
Console.WriteLine(result);
}
}
}
~.Parse(string)
public static double GetNumericValue (char c);
- 문자가 숫자를 나타내는 경우에는
c
의 숫자 값을 반환하고 그렇지 않은 경우에는 -1.0을 반환
Math.Pow(double x, double n)
: n의 n승 제곱