結果
| 問題 |
No.809 かけ算
|
| コンテスト | |
| ユーザー |
funakoshi
|
| 提出日時 | 2019-07-01 16:19:34 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,005 bytes |
| コンパイル時間 | 785 ms |
| コンパイル使用メモリ | 110,108 KB |
| 実行使用メモリ | 25,552 KB |
| 最終ジャッジ日時 | 2024-07-19 16:25:46 |
| 合計ジャッジ時間 | 1,955 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 3 WA * 3 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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(ans2*ans1==c)
{
flg = true;
break;
}
}
}
if(flg==true)
{
break;
}
}
Console.WriteLine(ans1 + " " + ans2);
}
}
}
funakoshi