Skip to content
Programmingoneonone
Programmingoneonone
  • Engineering Subjects
    • Internet of Things (IoT)
    • Digital Communication
    • Human Values
  • Programming Tutorials
    • C Programming
    • Data structures and Algorithms
    • 100+ Java Programs
    • 100+ C Programs
    • 100+ C++ Programs
  • Solutions
    • HackerRank
      • Algorithms Solutions
      • C solutions
      • C++ solutions
      • Java solutions
      • Python solutions
      • Data Structures Solutions
    • Leetcode Solutions
    • HackerEarth Solutions
  • Work with US
Programmingoneonone
Programmingoneonone

HackerEarth The art of verification problem solution

YASH PAL, 31 July 202413 February 2026
In this HackerEarth The art of verification problem solution Cleartrip decided that they wanted to verify the username and password of its users while they were authenticating for a process. One of the code services forms a GET URL which contains the username and password as its parameters. While parsing the URL, the code needs to extract the key-value pairs of ALL the parameters passed in the request URL which may contain ‘&’ or/and ‘=’.
 
The string can contain any type of alphabetical, numeric, and special characters in the URL.
 
 
HackerEarth The art of verification problem solution

 

 

HackerEarth The art of verification problem solution.

s=input()

un=s[s.find('username')+9:s.find('pwd')-1]

pwd=s[s.find('pwd')+4:s.find('profile')-1]

pr=s[s.find('profile')+8:s.find('role')-1]

r=s[s.find('role')+5:s.find('key')-1]

key=s[s.find('key')+4:]

print("username:",un)

print("pwd:",pwd)

print("profile:",pr)

print("role:",r)

print("key:",key)
 
coding problems solutions HackerEarth HackerEarth

Post navigation

Previous post
Next post

Leave a Reply

Your email address will not be published. Required fields are marked *

Programmingoneonone

We at Programmingoneonone, also known as Programming101 is a learning hub of programming and other related stuff. We provide free learning tutorials/articles related to programming and other technical stuff to people who are eager to learn about it.

Pages

  • About US
  • Contact US
  • Privacy Policy

Practice

  • Java
  • C++
  • C

Follow US

  • YouTube
  • LinkedIn
  • Facebook
  • Pinterest
  • Instagram
©2026 Programmingoneonone | WordPress Theme by SuperbThemes