結果

問題 No.207 世界のなんとか
ユーザー tabataba
提出日時 2024-08-30 09:16:52
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 59 ms / 5,000 ms
コード長 586 bytes
コンパイル時間 11,237 ms
コンパイル使用メモリ 169,548 KB
実行使用メモリ 186,148 KB
最終ジャッジ日時 2024-08-30 09:17:08
合計ジャッジ時間 13,859 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
30,208 KB
testcase_01 AC 57 ms
30,200 KB
testcase_02 AC 55 ms
29,952 KB
testcase_03 AC 54 ms
29,824 KB
testcase_04 AC 55 ms
30,208 KB
testcase_05 AC 56 ms
30,208 KB
testcase_06 AC 55 ms
30,060 KB
testcase_07 AC 55 ms
30,208 KB
testcase_08 AC 55 ms
29,944 KB
testcase_09 AC 55 ms
29,824 KB
testcase_10 AC 55 ms
30,080 KB
testcase_11 AC 55 ms
30,080 KB
testcase_12 AC 54 ms
30,060 KB
testcase_13 AC 55 ms
30,208 KB
testcase_14 AC 55 ms
29,948 KB
testcase_15 AC 55 ms
30,080 KB
testcase_16 AC 55 ms
30,080 KB
testcase_17 AC 57 ms
29,824 KB
testcase_18 AC 59 ms
186,148 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (109 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

using System;
public class Program
{
    static void Main()
    {
        long[] ab = ReadLineLong();
        for (long n = ab[0]; n <= ab[1]; n++)
        {
            if (n % 3 == 0)
            {
                Console.WriteLine(n);
            }
            else
            {
                if (n.ToString().Contains("3"))
                {
                    Console.WriteLine(n);
                }
            }
        }
    }

    static long[] ReadLineLong()
    {
        var s = Console.ReadLine() ?? "";
        return s.Split(' ').Select(long.Parse).ToArray();
    }
}
0