結果

問題 No.207 世界のなんとか
ユーザー nattoumarunattoumaru
提出日時 2018-02-14 16:49:23
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 58 ms / 5,000 ms
コード長 789 bytes
コンパイル時間 1,098 ms
コンパイル使用メモリ 59,468 KB
実行使用メモリ 22,824 KB
最終ジャッジ日時 2023-08-23 12:40:09
合計ジャッジ時間 2,897 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
20,772 KB
testcase_01 AC 58 ms
22,824 KB
testcase_02 AC 58 ms
22,640 KB
testcase_03 AC 57 ms
20,776 KB
testcase_04 AC 58 ms
20,728 KB
testcase_05 AC 57 ms
18,544 KB
testcase_06 AC 56 ms
20,744 KB
testcase_07 AC 56 ms
20,824 KB
testcase_08 AC 57 ms
20,704 KB
testcase_09 AC 57 ms
20,764 KB
testcase_10 AC 57 ms
22,684 KB
testcase_11 AC 56 ms
20,708 KB
testcase_12 AC 55 ms
20,660 KB
testcase_13 AC 56 ms
20,776 KB
testcase_14 AC 56 ms
20,756 KB
testcase_15 AC 56 ms
20,752 KB
testcase_16 AC 56 ms
20,780 KB
testcase_17 AC 55 ms
22,756 KB
testcase_18 AC 54 ms
20,768 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace programPractice
{
    class Program
    {
        static void Main(string[] args) {
            var stArray = Console.ReadLine().Split();
            int[] iArray = new int[2];
            for (int i = 0; i < 2; i++)
            {
                iArray[i] = Int32.Parse(stArray[i]);
            }

            for (int k = iArray[0]; k < iArray[1]+1; k++)
            {
                string stk = k.ToString();
                if (k % 3 == 0)
                {
                    Console.WriteLine(k);
                }else if (stk.Contains("3"))
                {
                    Console.WriteLine(k);
                }
            }
        }

    }
}
0