10430 나머지

Console/Algorithm 2019. 9. 27. 11:36
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            {
                string s = Console.ReadLine();
                string[] ss = s.Split();
                int a = int.Parse(ss[0]);
                int b = int.Parse(ss[1]);
                int c = int.Parse(ss[2]);
                Console.WriteLine((a + b) % c);
                Console.WriteLine((a % c + b % c) % c);
                Console.WriteLine((a * b) % c);
                Console.WriteLine((a % c * b % c) % c);
            }
        }
    }
        
}
 
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
 

'Console > Algorithm' 카테고리의 다른 글

9498 시험성적  (0) 2019.09.27
2588 곱셈  (0) 2019.09.27
10869 사칙연산  (0) 2019.09.27
1008 A/B  (0) 2019.09.27
9655 돌 게임  (0) 2019.09.26