結果
| 問題 | No.414 衝動 |
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2016-08-27 14:18:36 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 790 bytes |
| 記録 | |
| コンパイル時間 | 1,110 ms |
| コンパイル使用メモリ | 104,576 KB |
| 実行使用メモリ | 22,528 KB |
| 最終ジャッジ日時 | 2024-11-08 19:14:11 |
| 合計ジャッジ時間 | 4,048 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 TLE * 1 -- * 7 |
コンパイルメッセージ
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;
class Program {
static int ReadInt() { return int.Parse(Console.ReadLine()); }
static int[] ReadInts() { return Console.ReadLine().Split().Select(int.Parse).ToArray(); }
static string[] ReadStrings() { return Console.ReadLine().Split(); }
static void Calc(long m) {
if (m % 2 == 0) {
Console.WriteLine("{0} {1}", 2, m / 2);
return;
}
for (int i = 3; i * i <= m; i += 2) {
if (m % i == 0) {
Console.WriteLine("{0} {1}", i, m / i);
return;
}
}
Console.WriteLine("{0} {1}", 1, m);
}
static void Main() {
long m = long.Parse(Console.ReadLine());
Calc(m);
}
}
norioc