結果
問題 | No.138 化石のバージョン |
ユーザー |
![]() |
提出日時 | 2019-12-05 23:22:19 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 35 ms / 5,000 ms |
コード長 | 821 bytes |
コンパイル時間 | 113 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-12-23 04:18:09 |
合計ジャッジ時間 | 2,533 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
ソースコード
# coding: utf-8# Your code here!def target_index(l, x, default=999):if x in l:return l.index(x)else:return defaultlist_0 = input().split('.')list_1 = input().split('.')rel = []for i in range(3):if int(list_0[i]) == int(list_1[i]):rel.append(0)elif int(list_0[i]) > int(list_1[i]):rel.append(-1)elif int(list_0[i]) < int(list_1[i]):rel.append(1)judge_list = [i <= 0 for i in rel]res = 0# print('rel: {}'.format(rel))# print('judge_list: {}'.format(judge_list))if 1 not in rel:# print('passed1')res = 1elif -1 not in rel:# print('passed2')if all(judge_list):res = 1else:# print('passed3')if rel.index(-1) < rel.index(1):res = 1if res == 1:print('YES')else:print('NO')