'''
yomikomi.txtの中身
21
42134
31
3211
efeqf
3
15
764
9
10
dedq
ai
ふぉあふぁff
3214dくぇydf
gdy43rddsqd
'''
#正規表現を読み込むためにimport
import re
#ファイルを読み込む
file = open("yomikomi.txt","r")
#lencountの初期値
lencount = -1
#繰り返しでlineに入れる
for line in file:
#正規表現で数字に合致した場合numberに代入(\dは数字を表す)、文字の場合は空のリスト
number = (re.findall('\d+$', line))
#実行するたびに1をプラスして今実行してる要素数を計算
count = lencount + 1
#文字列かどうか判定:lenでリストが埋まっているの場合(数字の場合)1を出力、リストが空場合(文字列の場合)0出力
if len(number) == 0:
print("文字列です")
elif len(number) == 1:
#属性が文字なのでintで数値に変換
num = int(number[count])
if num % 3 == 0 and num % 5 == 0:
print("3と5の倍数です")
elif num % 3 == 0:
print("3の倍数です")
elif num % 5 == 0:
print("5の倍数です")
else:
print("数字です")
else:
("認識できない文字列です")
#ファイルを閉じる
file.close()
JycnCnlvbWlrb21pLnR4dOOBruS4rei6qwoyMQo0MjEzNAozMQozMjExCmVmZXFmCjMKMTUKNzY0CjkKMTAKZGVkcQphaQrjgbXjgYnjgYLjgbXjgYHvvYbvvYYKMzIxNO+9hOOBj+OBh++9me+9hO+9hgpnZHk0M3Jk772E772T772R772ECicnJwoj5q2j6KaP6KGo54++44KS6Kqt44G/6L6844KA44Gf44KB44GraW1wb3J0CmltcG9ydCByZQoj44OV44Kh44Kk44Or44KS6Kqt44G/6L6844KACmZpbGUgPSBvcGVuKCJ5b21pa29taS50eHQiLCJyIikKI2xlbmNvdW5044Gu5Yid5pyf5YCkCmxlbmNvdW50ID0gLTEKI+e5sOOCiui/lOOBl+OBp2xpbmXjgavlhaXjgozjgosKZm9yIGxpbmUgaW4gZmlsZToKI+ato+imj+ihqOePvuOBp+aVsOWtl+OBq+WQiOiHtOOBl+OBn+WgtOWQiG51bWJlcuOBq+S7o+WFpe+8iFxk44Gv5pWw5a2X44KS6KGo44GZ77yJ44CB5paH5a2X44Gu5aC05ZCI44Gv56m644Gu44Oq44K544OICiAgICBudW1iZXIgPSAocmUuZmluZGFsbCgnXGQrJCcsIGxpbmUpKQogICAgI+Wun+ihjOOBmeOCi+OBn+OBs+OBqzHjgpLjg5fjg6njgrnjgZfjgabku4rlrp/ooYzjgZfjgabjgovopoHntKDmlbDjgpLoqIjnrpcKICAgIGNvdW50ID0gbGVuY291bnQgKyAxCiAgICAj5paH5a2X5YiX44GL44Gp44GG44GL5Yik5a6aOmxlbuOBp+ODquOCueODiOOBjOWfi+OBvuOBo+OBpuOBhOOCi+OBruWgtOWQiO+8iOaVsOWtl+OBruWgtOWQiO+8iTHjgpLlh7rlipvjgIHjg6rjgrnjg4jjgYznqbrloLTlkIgo5paH5a2X5YiX44Gu5aC05ZCIKTDlh7rlipsKICAgIGlmIGxlbihudW1iZXIpID09IDA6CiAgICAgICAgcHJpbnQoIuaWh+Wtl+WIl+OBp+OBmSIpCiAgICBlbGlmIGxlbihudW1iZXIpID09IDE6CiAgICAgICAgI+WxnuaAp+OBjOaWh+Wtl+OBquOBruOBp2ludOOBp+aVsOWApOOBq+WkieaPmwogICAgICAgIG51bSA9IGludChudW1iZXJbY291bnRdKQogICAgICAgIGlmIG51bSAlIDMgPT0gMCBhbmQgbnVtICUgNSA9PSAwOgogICAgICAgICAgICBwcmludCgiM+OBqDXjga7lgI3mlbDjgafjgZkiKQogICAgICAgIGVsaWYgbnVtICUgMyA9PSAwOgogICAgICAgICAgICBwcmludCgiM+OBruWAjeaVsOOBp+OBmSIpCiAgICAgICAgZWxpZiBudW0gJSA1ID09IDA6CiAgICAgICAgICAgIHByaW50KCI144Gu5YCN5pWw44Gn44GZIikKICAgICAgICBlbHNlOgogICAgICAgICAgICBwcmludCgi5pWw5a2X44Gn44GZIikKICAgIGVsc2U6CiAgICAgICAgKCLoqo3orZjjgafjgY3jgarjgYTmloflrZfliJfjgafjgZkiKQoj44OV44Kh44Kk44Or44KS6ZaJ44GY44KLCmZpbGUuY2xvc2UoKQ==