結果

問題 No.207 世界のなんとか
ユーザー nattoumarunattoumaru
提出日時 2018-02-14 16:56:48
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 59 ms / 5,000 ms
コード長 787 bytes
コンパイル時間 1,407 ms
コンパイル使用メモリ 61,172 KB
実行使用メモリ 22,784 KB
最終ジャッジ日時 2023-08-23 12:54:52
合計ジャッジ時間 3,371 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
22,776 KB
testcase_01 AC 57 ms
20,676 KB
testcase_02 AC 57 ms
20,836 KB
testcase_03 AC 58 ms
20,680 KB
testcase_04 AC 58 ms
20,604 KB
testcase_05 AC 58 ms
22,644 KB
testcase_06 AC 58 ms
22,640 KB
testcase_07 AC 58 ms
20,660 KB
testcase_08 AC 58 ms
20,680 KB
testcase_09 AC 57 ms
20,740 KB
testcase_10 AC 58 ms
20,736 KB
testcase_11 AC 58 ms
20,772 KB
testcase_12 AC 58 ms
20,684 KB
testcase_13 AC 58 ms
22,760 KB
testcase_14 AC 59 ms
22,784 KB
testcase_15 AC 58 ms
20,680 KB
testcase_16 AC 58 ms
20,656 KB
testcase_17 AC 57 ms
20,732 KB
testcase_18 AC 56 ms
18,696 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]; k++)
            {
                string stk = k.ToString();
                if (k % 3 == 0)
                {
                    Console.WriteLine(k);
                }else if (stk.Contains("3"))
                {
                    Console.WriteLine(k);
                }
            }
        }

    }
}
0