結果

問題 No.207 世界のなんとか
ユーザー AtriaAtria
提出日時 2019-11-10 16:18:26
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 61 ms / 5,000 ms
コード長 707 bytes
コンパイル時間 1,084 ms
コンパイル使用メモリ 66,052 KB
実行使用メモリ 23,960 KB
最終ジャッジ日時 2023-10-13 07:47:12
合計ジャッジ時間 3,223 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
21,828 KB
testcase_01 AC 59 ms
21,980 KB
testcase_02 AC 59 ms
21,804 KB
testcase_03 AC 60 ms
21,928 KB
testcase_04 AC 58 ms
21,816 KB
testcase_05 AC 59 ms
23,860 KB
testcase_06 AC 59 ms
23,892 KB
testcase_07 AC 59 ms
21,992 KB
testcase_08 AC 59 ms
23,960 KB
testcase_09 AC 60 ms
23,868 KB
testcase_10 AC 60 ms
21,760 KB
testcase_11 AC 61 ms
21,756 KB
testcase_12 AC 61 ms
21,928 KB
testcase_13 AC 60 ms
19,936 KB
testcase_14 AC 61 ms
21,940 KB
testcase_15 AC 61 ms
21,936 KB
testcase_16 AC 61 ms
21,840 KB
testcase_17 AC 60 ms
21,908 KB
testcase_18 AC 57 ms
19,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using static System.Console;
using static System.Math;

namespace CP
{
    class Atria
    {
        static void Main(string[] args)
        {
            int[] s = ReadLine().Split(' ').Select(int.Parse).ToArray();
            for (int i = s[0]; i <= s[1]; i++)
            {
                if (EachDigit(i) || i % 3 == 0)
                {
                    WriteLine(i);
                }
            }
        }
        static bool EachDigit(long x)
        {
            if (x == 0) return false;
            if (x % 10 == 3) return true;

            return EachDigit(x / 10);
        }
    }
}
0