結果
| 問題 |
No.207 世界のなんとか
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-10-20 15:34:12 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 680 bytes |
| コンパイル時間 | 1,000 ms |
| コンパイル使用メモリ | 112,204 KB |
| 実行使用メモリ | 26,876 KB |
| 最終ジャッジ日時 | 2024-11-22 16:18:54 |
| 合計ジャッジ時間 | 2,060 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 19 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
public class Program
{
static void Main()
{
string AB = Console.ReadLine();
string A_ = "";
int i = 0;
while (AB.Substring(i,1) != " ")
{
A_ = A_ + AB.Substring(i, 1);
i++;
}
int A = Convert.ToInt32(A_);
int B = Convert.ToInt32(AB.Substring(i + 1));
int N = B - A;
if (N >= 0 && N <= 100)
{
for (int d = 0; d < N + 1; d++)
{
string d_ = d.ToString();
if (d % 3 == 0)
{
Console.WriteLine(d.ToString());
continue;
}
else if(d_.IndexOf("3") >= 0)
{
Console.WriteLine(d.ToString());
}
}
}
}
}