結果

問題 No.207 世界のなんとか
ユーザー kmtrc130kmtrc130
提出日時 2019-03-18 15:37:46
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 77 ms / 5,000 ms
コード長 541 bytes
コンパイル時間 2,171 ms
コンパイル使用メモリ 104,900 KB
実行使用メモリ 23,420 KB
最終ジャッジ日時 2023-09-25 12:55:51
合計ジャッジ時間 4,517 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
21,252 KB
testcase_01 AC 75 ms
21,396 KB
testcase_02 AC 77 ms
21,344 KB
testcase_03 AC 75 ms
21,412 KB
testcase_04 AC 75 ms
21,416 KB
testcase_05 AC 76 ms
19,196 KB
testcase_06 AC 75 ms
21,408 KB
testcase_07 AC 76 ms
23,224 KB
testcase_08 AC 77 ms
21,192 KB
testcase_09 AC 76 ms
21,192 KB
testcase_10 AC 75 ms
21,120 KB
testcase_11 AC 76 ms
21,368 KB
testcase_12 AC 76 ms
21,144 KB
testcase_13 AC 77 ms
23,420 KB
testcase_14 AC 76 ms
21,236 KB
testcase_15 AC 77 ms
21,272 KB
testcase_16 AC 75 ms
21,336 KB
testcase_17 AC 57 ms
20,820 KB
testcase_18 AC 73 ms
21,332 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.Linq;

class Program
{
    public void Solve()
    {
        string[] AB = Console.ReadLine().Split(' ');

        long A = long.Parse(AB[0]);
        long B = long.Parse(AB[1]);

        for (long i = A; i <= B; i++)
        {
            if (i % 3 == 0) { Console.WriteLine(i); continue; }
            if (i.ToString().IndexOf("3") >= 0) { Console.WriteLine(i); }
        }
    }

    static void Main()
    {
        var solver = new Program();
        solver.Solve();
    }
}
0