結果
| 問題 | No.791 うし数列 |
| コンテスト | |
| ユーザー |
Maeda
|
| 提出日時 | 2025-03-31 17:50:37 |
| 言語 | C# (.NET 10.0.201) |
| 結果 |
AC
|
| 実行時間 | 69 ms / 2,000 ms |
| コード長 | 927 bytes |
| 記録 | |
| コンパイル時間 | 7,416 ms |
| コンパイル使用メモリ | 171,536 KB |
| 実行使用メモリ | 194,268 KB |
| 最終ジャッジ日時 | 2026-07-08 05:23:14 |
| 合計ジャッジ時間 | 9,674 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 15 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (91 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net10.0/main.dll main -> /home/judge/data/code/bin/Release/net10.0/publish/
ソースコード
class Program
{
static void Main(string[] args)
{
string str = Console.ReadLine();
bool cowSequence = true;
if (str[0] != '1' || str.Length <= 1)
{
cowSequence = false;
}
string checkStr = str.Substring(1);
if (cowSequence)
{
for (int i = 0; i < 10; i++)
{
if (i == 3)
{
continue;
}
if (checkStr.IndexOf(i.ToString()) != -1)
{
cowSequence = false;
}
}
}
if (cowSequence)
{
Console.WriteLine(str.Length - 1);
}
else
{
Console.WriteLine("-1");
}
}
}
Maeda