結果

問題 No.207 世界のなんとか
ユーザー TDTD
提出日時 2022-05-25 09:30:26
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 72 ms / 5,000 ms
コード長 702 bytes
コンパイル時間 11,284 ms
コンパイル使用メモリ 158,068 KB
実行使用メモリ 178,960 KB
最終ジャッジ日時 2023-10-20 19:06:46
合計ジャッジ時間 14,698 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
33,432 KB
testcase_01 AC 72 ms
33,432 KB
testcase_02 AC 68 ms
33,432 KB
testcase_03 AC 65 ms
33,432 KB
testcase_04 AC 65 ms
33,432 KB
testcase_05 AC 69 ms
33,432 KB
testcase_06 AC 66 ms
33,444 KB
testcase_07 AC 65 ms
33,432 KB
testcase_08 AC 65 ms
33,432 KB
testcase_09 AC 67 ms
33,456 KB
testcase_10 AC 69 ms
33,432 KB
testcase_11 AC 66 ms
33,432 KB
testcase_12 AC 69 ms
33,432 KB
testcase_13 AC 69 ms
33,420 KB
testcase_14 AC 69 ms
33,428 KB
testcase_15 AC 68 ms
33,432 KB
testcase_16 AC 67 ms
33,452 KB
testcase_17 AC 69 ms
33,448 KB
testcase_18 AC 69 ms
178,960 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (96 ms)。
MSBuild のバージョン 17.7.3+8ec440e68 (.NET)
  main -> /home/judge/data/code/bin/Release/net7.0/main.dll
  main -> /home/judge/data/code/bin/Release/net7.0/publish/

ソースコード

diff #

using System;

namespace yukicoder
{
    class Program
    {
        static void Main(string[] args)
        {
               string[] str = Console.ReadLine().Split(' ');
            int a = int.Parse(str[0]);
            int b = int.Parse(str[1]);
            string s = "";
            string t = "3";
             
            for(int i = a; i <= b; i++)
            {
                s = i.ToString();
                int num = s.IndexOf(t, 0);
                if (i % 3 == 0)
                {
                    Console.WriteLine(i);
                }
                else if (num>=0)
                {
                    Console.WriteLine(i);
                }
            }
        }
    }
}
0