⌘K
Flycodx

Cold Chain Temperature Log Entry Validator

Cold Chain Temperature Log Entry Validator

EasyStrings0% accepted

A Delhi-based cold chain logistics company transporting vaccines encodes temperature readings in a specific format. Each log entry contains temperature (°C), humidity (%), and day number. The system must validate that entries follow the format and temperature stays within safe vaccine storage range of -25°C to -18°C.

Approach

Given a temperature log entry string in format 'T:XX.X_H:YY_D:DD', validate the format and check if temperature is between -25 and -18 (inclusive). Return 'Valid' or 'Invalid'.

Input

T:-22.5_H:45_D:01

Output

Valid
solution.py
Loading editor...
Test 1
Test 2
Test 3

Press Run to test your custom input, or Submit to judge against all test cases.

Sign in to continue

Create a free account to run code, submit solutions and track progress.

  • Free forever — no credit card
  • 10+ languages with live execution
  • Points, streaks & leaderboards
Auto Save OnLn 1, Col 1Spaces: 4UTF-8LFPython 3