백준 10430번

Console(콘솔)/알고리즘 2019. 9. 27. 13:23

using System;

 

 

namespace Syntax12

{

    class Program

    {

        static void Main(string[] args)

        {

            string input = Console.ReadLine();

            string[] arr = input.Split(' ');

            int a = int.Parse(arr[0].ToString());

            int b = int.Parse(arr[1].ToString());

            int c = int.Parse(arr[2].ToString());

            Console.WriteLine((a+b)%c);

            Console.WriteLine((a%c + b%c) % c);

            Console.WriteLine((a*b) % c);

            Console.WriteLine((a%c * b%c) % c);

        }

    }

}

 

 

'Console(콘솔) > 알고리즘' 카테고리의 다른 글

백준 2438번 문제  (0) 2019.09.30
백준 8393번  (0) 2019.09.30
백준 10869번  (0) 2019.09.27
백준 1008번  (0) 2019.09.27
백준 10998번  (0) 2019.09.27
: