結果

問題 No.1350 2019-6problem
ユーザー profugus
提出日時 2021-01-24 17:53:52
言語 C#(csc)
(csc 3.9.0)
結果
TLE  
実行時間 -
コード長 638 bytes
コンパイル時間 4,627 ms
コンパイル使用メモリ 108,764 KB
実行使用メモリ 46,652 KB
最終ジャッジ日時 2025-01-03 05:26:15
合計ジャッジ時間 50,897 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5 TLE * 16
権限があれば一括ダウンロードができます
コンパイルメッセージ
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;

class Program
{
    static void Main()
    {
        var nums_str = new List<string>(Console.ReadLine().Split(" "));
        int a = int.Parse(nums_str[0]);
        int b = int.Parse(nums_str[1]);
        int k = int.Parse(nums_str[2]);

        var results = new List<int>();

        for (int i = (a < b ? a : b); i < Math.Pow(10, 9) + 1; i++)
        {
            if ((i % a == 0) || (i % b == 0))
            {
                results.Add(i);
            }

            if (results.Count == k)
			{
                break;
			}
        }

        Console.Write(results[k - 1]);
    }
}
0