結果
| 問題 | No.791 うし数列 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-12-03 14:12:14 |
| 言語 | C# (.NET 10.0.201) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 569 bytes |
| 記録 | |
| コンパイル時間 | 4,907 ms |
| コンパイル使用メモリ | 168,712 KB |
| 実行使用メモリ | 189,404 KB |
| 最終ジャッジ日時 | 2026-07-17 10:26:51 |
| 合計ジャッジ時間 | 6,691 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 14 WA * 1 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (89 ミリ秒)。 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 num = Console.ReadLine()!;
if (!num.Contains("1") || !num.Contains("3"))
{
Console.WriteLine(-1);
return;
}
num = num.TrimStart('1');
int count = 0;
foreach (char c in num)
{
if (c == '3')
{
count++;
}
else
{
Console.WriteLine(-1);
return;
}
}
Console.WriteLine(count);
}
}