Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Numerics;
- class ThreeSixNine
- {
- static void Main()
- {
- int A = int.Parse(Console.ReadLine());
- int B = int.Parse(Console.ReadLine());
- int C = int.Parse(Console.ReadLine());
- BigInteger R = 0;
- BigInteger answerR = 0;
- if (B == 3)
- {
- R = A + C;
- }
- if (B == 6)
- {
- R = (BigInteger)A * C;
- }
- if (B == 9)
- {
- R = A % C;
- }
- if (R % 3 == 0)
- {
- answerR = R / 3;
- Console.WriteLine(answerR);
- }
- if (R % 3 != 0)
- {
- answerR = R % 3;
- Console.WriteLine(answerR);
- }
- Console.WriteLine(R);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment