結果
| 問題 |
No.791 うし数列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-06-10 19:15:57 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 28 ms / 2,000 ms |
| コード長 | 442 bytes |
| コンパイル時間 | 334 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-10-06 00:44:46 |
| 合計ジャッジ時間 | 1,382 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 15 |
ソースコード
import sys
if __name__ == '__main__':
n = list(input())
for i in range(len(n)):
if i == 0:
if n[i] == "1":
continue
else:
print(-1)
sys.exit(0)
else:
if n[i] == "3":
continue
else:
print(-1)
sys.exit(0)
if len(n) == 1:
print(-1)
else:
print(len(n)-1)