結果

問題 No.207 世界のなんとか
ユーザー mbanmban
提出日時 2016-11-04 14:49:19
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 63 ms / 5,000 ms
コード長 631 bytes
コンパイル時間 2,116 ms
コンパイル使用メモリ 104,468 KB
実行使用メモリ 24,000 KB
最終ジャッジ日時 2023-08-16 13:43:58
合計ジャッジ時間 4,554 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
21,820 KB
testcase_01 AC 61 ms
21,820 KB
testcase_02 AC 62 ms
21,844 KB
testcase_03 AC 61 ms
21,832 KB
testcase_04 AC 60 ms
22,084 KB
testcase_05 AC 62 ms
24,000 KB
testcase_06 AC 61 ms
21,916 KB
testcase_07 AC 61 ms
21,988 KB
testcase_08 AC 61 ms
23,808 KB
testcase_09 AC 62 ms
21,820 KB
testcase_10 AC 61 ms
21,808 KB
testcase_11 AC 62 ms
21,940 KB
testcase_12 AC 63 ms
23,888 KB
testcase_13 AC 62 ms
22,020 KB
testcase_14 AC 62 ms
23,812 KB
testcase_15 AC 61 ms
21,824 KB
testcase_16 AC 62 ms
21,912 KB
testcase_17 AC 58 ms
21,820 KB
testcase_18 AC 59 ms
21,904 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

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

class Magatro
{
    static void Main()
    {
        int[] AB = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();


        for (int i = AB[0];i<=AB[1];i++)
        {
            if (three(i))
            {
                Console.WriteLine(i);
            }
        }
    }
    static bool three(int n)
    {
        if (n % 3 == 0)
        {
            return true;
        }
        if (n.ToString().IndexOf('3') > -1)
        {
            return true;
        }
        return false;
    }
}
0