Submission #1966200


Source Code Expand

using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using System.Runtime.InteropServices;
using System.Runtime.Remoting.Messaging;
using System.Security.Principal;
using System.Text;
class Simple
{
    long N, M;
    const int mod = (int)1e9 + 7;
    void Solve() {
        //input
        N = io.Int;
        //cal
        var snuke = 1L;
        for(int i = 1; i <= N; ++i) {
            snuke = (snuke * i) % mod;
        }
        //ret
        Console.WriteLine(snuke);
    }
    SimpleIO io = new SimpleIO();
    public static void Main(string[] args) => new Simple().Stream();
    void Stream() {
        //var exStdIn = new System.IO.StreamReader("stdin.txt");
        //System.Console.SetIn(exStdIn);
        Solve();
        io.writeFlush();
    }

}
class SimpleIO
{
    string[] nextBuffer;
    int BufferCnt;
    char[] cs = new char[] { ' ' };
    StreamWriter sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
    public SimpleIO() {
        nextBuffer = new string[0];
        BufferCnt = 0;
        Console.SetOut(sw);
    }
    public string Next() {
        if (BufferCnt < nextBuffer.Length) return nextBuffer[BufferCnt++];
        string st = Console.ReadLine();
        while (st == "") st = Console.ReadLine();
        nextBuffer = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
        BufferCnt = 0;
        return nextBuffer[BufferCnt++];
    }
    public string String => Next();
    public char Char => char.Parse(String);
    public int Int => int.Parse(String);
    public long Long => long.Parse(String);
    public double Double => double.Parse(String);
    public void writeFlush() { Console.Out.Flush(); }
}

Submission Info

Submission Time
Task B - Training Camp
User rui0422
Language C# (Mono 4.6.2.0)
Score 200
Code Size 1850 Byte
Status AC
Exec Time 22 ms
Memory 11092 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 7
Set Name Test Cases
Sample 00_example_01.txt, 00_example_02.txt, 00_example_03.txt
All 00_example_01.txt, 00_example_02.txt, 00_example_03.txt, 01.txt, 02.txt, 03.txt, 04.txt
Case Name Status Exec Time Memory
00_example_01.txt AC 20 ms 9044 KB
00_example_02.txt AC 21 ms 11092 KB
00_example_03.txt AC 22 ms 11092 KB
01.txt AC 19 ms 9044 KB
02.txt AC 20 ms 9044 KB
03.txt AC 21 ms 9044 KB
04.txt AC 22 ms 11092 KB