結果

問題 No.220 世界のなんとか2
ユーザー shima1104shima1104
提出日時 2019-03-12 12:31:44
言語 C#(csc)
(csc 3.9.0)
結果
TLE  
実行時間 -
コード長 679 bytes
コンパイル時間 2,316 ms
コンパイル使用メモリ 97,724 KB
実行使用メモリ 31,400 KB
最終ジャッジ日時 2023-09-05 20:20:41
合計ジャッジ時間 6,892 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
25,416 KB
testcase_01 AC 60 ms
21,000 KB
testcase_02 AC 61 ms
21,304 KB
testcase_03 AC 60 ms
21,348 KB
testcase_04 AC 76 ms
23,368 KB
testcase_05 AC 217 ms
23,220 KB
testcase_06 TLE -
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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;

namespace test_2
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] n = Console.ReadLine().Split();
            int s = int.Parse(n[0]);

            int count = 0;

            for(int i = 1; i <= Math.Pow(10,s); i++)
            {
                if(i%3 == 0)
                {
                    count++;
                }
                else if (i.ToString().Contains("3"))
                {
                    count++;
                }
            }

            Console.WriteLine(count);
        }
    }
}
0