結果

問題 No.414 衝動
ユーザー rtomprtomp
提出日時 2016-09-01 17:59:24
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 2,017 bytes
コンパイル時間 2,045 ms
コンパイル使用メモリ 112,148 KB
実行使用メモリ 25,840 KB
最終ジャッジ日時 2024-04-27 14:26:22
合計ジャッジ時間 2,558 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 24 ms
23,776 KB
testcase_02 AC 24 ms
23,724 KB
testcase_03 WA -
testcase_04 AC 25 ms
23,904 KB
testcase_05 AC 24 ms
23,780 KB
testcase_06 AC 24 ms
21,688 KB
testcase_07 AC 24 ms
23,928 KB
testcase_08 AC 24 ms
25,840 KB
testcase_09 WA -
testcase_10 AC 25 ms
23,988 KB
testcase_11 WA -
testcase_12 AC 24 ms
23,856 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.IO;
 
public class Test
{
	static int N;

    static int[,] ans;

    static int Row = 0;
    static int Col = 0;
    static int Step;
   	static int OutputCounter = 1;
   	static bool ptrSwitch = true;
    
    public static void Solve()
    {            
    	long M = MyConsole.Long();

        if (M % 2 == 0)
        {
            Console.WriteLine( "2 {0}", (M / 2).ToString() );
        }
        else if (M % 3 == 0)
        {
            Console.WriteLine( "3 {0}", (M / 3).ToString() );
        }
        else
        {
            Console.WriteLine( "1 {0}", M.ToString() ); 
        }
    }
 
    public static void Main()
    {
        MyConsole.Read(); Solve(); MyConsole.Finish();
    }
}

public static class MyConsole
{
    private static List<string> ReadedLine = new List<string>();
    private static char[] buf = new char[1024];
    private static int i;

    public static void Read()
    {
        TextReader sr = Console.In;

        int Len = sr.Read( buf, 0, 1024 );
        var Line = string.Empty;

        for (int i = 0 ; i < Len ; i++)
        {
            if (buf[i] >= 33 && buf[i] <= 126)
            {
                Line += buf[i];
            }
            else if (Line.Length > 0)
            {
                ReadedLine.Add( Line );
                Line = string.Empty;
            }

        }
        if (Line.Length > 0) ReadedLine.Add( Line );

        Console.SetOut( new StreamWriter( Console.OpenStandardOutput() ) { AutoFlush = false } );
    }

    public static string String() { return ReadedLine[i++]; }
    public static int Int() { return int.Parse( ReadedLine[i++] ); }
    public static long Long() { return long.Parse( ReadedLine[i++] ); }
    public static double Double() { return double.Parse( ReadedLine[i++] ); }

    public static void wLine( string output = null )
    {
        Console.WriteLine( output );
    }

    public static void Finish()
    {
        Console.Out.Flush();
    }
}
0