Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
from collections import deque time = deque(int(x) for x in input().split()) tasks = [int(x) for x in input().split()] dictionary = { 'Darth Vader Ducky': [], 'Thor Ducky': [], 'Big Blue Rubber Ducky': [], 'Small Yellow Rubber Ducky': [] } result = 0 while time: first_value_time =time.popleft() last_value_tasks = tasks.pop() result = first_value_time * last_value_tasks if 0 < result <= 60: dictionary['Darth Vader Ducky'].append(result) elif 61 <= result <= 120: dictionary['Thor Ducky'].append(result) elif 121 <= result <= 180: dictionary['Big Blue Rubber Ducky'].append(result) elif 181 <= result <= 240: dictionary['Small Yellow Rubber Ducky'].append(result) elif result > 240: time.append(first_value_time) tasks.append(last_value_tasks - 2) print(f"Congratulations, all tasks have been completed! Rubber ducks rewarded: ") for ducky, value in dictionary.items(): print(f"{ducky}: {len(value)}")
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)