Submission #3435808


Source Code Expand

using System;
using System.Collections.Generic;
using static System.Console;

class Program
{
    static void Main()
    {
        var a = NextInt();
        var b = NextInt();
        var c = NextInt();

        long ans = 1;

        foreach (var v in new int[] { a, b, c })
        {
            ans = (ans * v) % (Pow(10, 9) + 7);
        }
        WriteLine(ans);
    }

    static int Pow(int a, int b)
    {
        int result = 1;
        for (var i = 0; i < b; i++)
        {
            result *= a;
        }
        return result;
    }

    static int NextInt()
    {
        return int.Parse(NextString());
    }

    static string NextString()
    {
        var result = new List<char>();
        while (true)
        {
            int next = Read();
            if (next < 0)
                break;
            var nextChar = (char)next;
            if (!char.IsWhiteSpace(nextChar))
                result.Add(nextChar);
            else if (nextChar != '\r')
                break;
        }
        return string.Join("", result);
    }
}

Submission Info

Submission Time
Task B - 直方体
User ToshiroYanagi
Language C# (Mono 4.6.2.0)
Score 100
Code Size 1111 Byte
Status AC
Exec Time 23 ms
Memory 13268 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 4
AC × 9
Set Name Test Cases
Sample 0_00.txt, 0_01.txt, 0_02.txt, 0_03.txt
All 0_00.txt, 0_01.txt, 0_02.txt, 0_03.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt, 1_04.txt
Case Name Status Exec Time Memory
0_00.txt AC 22 ms 9172 KB
0_01.txt AC 21 ms 9172 KB
0_02.txt AC 21 ms 9172 KB
0_03.txt AC 22 ms 13268 KB
1_00.txt AC 22 ms 11220 KB
1_01.txt AC 23 ms 13268 KB
1_02.txt AC 22 ms 11220 KB
1_03.txt AC 21 ms 9172 KB
1_04.txt AC 22 ms 11220 KB