結果

問題 No.207 世界のなんとか
ユーザー curryudon08
提出日時 2020-02-14 00:02:34
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 754 bytes
コンパイル時間 931 ms
コンパイル使用メモリ 113,892 KB
実行使用メモリ 27,520 KB
最終ジャッジ日時 2024-10-06 06:47:43
合計ジャッジ時間 2,153 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9 WA * 10
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.Linq;
using System.Collections.Generic;

namespace _0207
{
    class Program
    {
        static void Main(string[] args)
        {
            var s = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray();
            var a = s[0];
            var b = s[1];

            for(var i = a; i < b; i++){
                if(IsThree(i)){
                    Console.WriteLine(i);
                }
            }
        }

        static bool IsThree(int i){
            if(i % 3 == 0){
                return true;
            }
            while(i > 0){
                if(i % 10 == 3){
                    return true;
                }
                i /= 10;
            }
            return false;
        }
    }
}
0