




import requests

try:
					from django.contrib.auth import authenticate, login
					from django.shortcuts import redirect, render
except ImportError:
					UpperCamelCase__            =     UpperCamelCase__            =     UpperCamelCase__            =     UpperCamelCase__            =     print







def       _a (		SCREAMING_SNAKE_CASE_				:							Optional[Any]	):
					# Enter your recaptcha secret key here
					__lowerCAmelCase							  =			"secretKey"
					__lowerCAmelCase							  =			"https://www.google.com/recaptcha/api/siteverify"

					# when method is not POST, direct user to login page
					if request.method != "POST":
										return render(SCREAMING_SNAKE_CASE_ , "login.html"	)

					# from the frontend, get username, password, and client_key
					__lowerCAmelCase							  =			request.POST.get("username"	)
					__lowerCAmelCase							  =			request.POST.get("password"	)
					__lowerCAmelCase							  =			request.POST.get("g-recaptcha-response"	)

					# post recaptcha response to Google's recaptcha api
					__lowerCAmelCase							  =			requests.post(SCREAMING_SNAKE_CASE_ , data={"secret": secret_key, "response": client_key}	)
					# if the recaptcha api verified our keys
					if response.json().get("success" , SCREAMING_SNAKE_CASE_	):
										# authenticate the user
										__lowerCAmelCase							  =			authenticate(SCREAMING_SNAKE_CASE_ , username=SCREAMING_SNAKE_CASE_ , password=SCREAMING_SNAKE_CASE_	)
										if user_in_database:
															login(SCREAMING_SNAKE_CASE_ , SCREAMING_SNAKE_CASE_	)
															return redirect("/your-webpage"	)
					return render(SCREAMING_SNAKE_CASE_ , "login.html"	)










import decimal







def       _a (		):
					__lowerCAmelCase							  =			0
					__lowerCAmelCase							  =			decimal.Context(prec=1_05	)
					for i in range(2 , 1_00	):
										__lowerCAmelCase							  =			decimal.Decimal(SCREAMING_SNAKE_CASE_	)
										__lowerCAmelCase							  =			number.sqrt(SCREAMING_SNAKE_CASE_	)
										if len(str(SCREAMING_SNAKE_CASE_	)	) > 1:
															answer += int(str(SCREAMING_SNAKE_CASE_	)[0]	)
															__lowerCAmelCase							  =			str(SCREAMING_SNAKE_CASE_	)[2:1_01]
															answer += sum(int(SCREAMING_SNAKE_CASE_	) for x in sqrt_number_str	)
					return answer


if __name__ == "__main__":
					import doctest

					doctest.testmod()
					print(f'''{solution() = }''')




