結果

問題 No.809 かけ算
ユーザー funakoshifunakoshi
提出日時 2019-07-01 16:22:21
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,002 bytes
コンパイル時間 3,765 ms
コンパイル使用メモリ 101,548 KB
実行使用メモリ 24,728 KB
最終ジャッジ日時 2023-09-23 03:49:08
合計ジャッジ時間 4,175 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 55 ms
22,592 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.Linq;
using System.Text;
using System.Threading.Tasks;

namespace yukicoderTest
{
    class Program
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            int c = int.Parse(str);
            int ans1 = 0;
            int ans2 = 0;
            bool flg = false;
            for (int i = 2; i <= 9; i++)
            {
                for(int j=2;j<=9;j++)
                {
                    if (c % i == 0)
                    {
                        ans1 = i;
                        ans2 = c / j;
                        if(j*ans1==c)
                        {
                            flg = true;
                            break;
                        }
                    }
                }
                if(flg==true)
                {
                    break;
                }
            }
            Console.WriteLine(ans1 + " " + ans2);

        }
    }
}
0