結果

問題 No.207 世界のなんとか
ユーザー chankou0920chankou0920
提出日時 2017-09-25 12:31:58
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 26 ms / 5,000 ms
コード長 497 bytes
コンパイル時間 912 ms
コンパイル使用メモリ 107,892 KB
実行使用メモリ 26,004 KB
最終ジャッジ日時 2024-04-26 21:46:00
合計ジャッジ時間 1,878 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
21,808 KB
testcase_01 AC 24 ms
23,820 KB
testcase_02 AC 25 ms
24,152 KB
testcase_03 AC 24 ms
23,904 KB
testcase_04 AC 24 ms
23,772 KB
testcase_05 AC 24 ms
23,772 KB
testcase_06 AC 24 ms
25,876 KB
testcase_07 AC 23 ms
23,776 KB
testcase_08 AC 24 ms
23,952 KB
testcase_09 AC 26 ms
23,896 KB
testcase_10 AC 25 ms
23,964 KB
testcase_11 AC 24 ms
23,980 KB
testcase_12 AC 25 ms
23,980 KB
testcase_13 AC 26 ms
24,092 KB
testcase_14 AC 25 ms
25,944 KB
testcase_15 AC 24 ms
23,772 KB
testcase_16 AC 25 ms
26,004 KB
testcase_17 AC 23 ms
23,908 KB
testcase_18 AC 23 ms
23,804 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class Test {
	public static bool isOk (long value) {
		if (value % 3 == 0) {
			return true;
		}
		while (value > 0) {
			if (value % 10 == 3) {
				return true;
			}
			value /= 10;
		}
		return false;
	}
	
	public static void Main(string[] args) {
		string[] nums = Console.ReadLine().Split(' ');
		long min = long.Parse(nums[0]);  // min >= 1
		long max = long.Parse(nums[1]);
		for (long i = min; i <= max; i++) {
			if (isOk(i)) {
				Console.WriteLine(i);
			}
		}
	}
}
0