3297 - I2P(II)2026_Kuo_HW1 Scoreboard

Time

2026/02/24 17:07:00 2026/03/10 12:00:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
14397 EECS
14398 Time machine
14453 Water distribution II
14886 67
14887 Scratcher Ticket

14397 - EECS   

Description

Hints:

  • If you're not familiar with character arrays, you can try using 5 characters to store the data instead.
  • There's another way to handle the overflow issue without using if-else, such as using modulo.
  • You can brute-force the solution by repeating the same process 5 times to replace the for-loop.

EECS (Elephant EnCryption System) is an encryption method that allows elephants to communicate using ciphertext without letting other animals understand the content.

The rules of EECS are as follows:

  • Shift each character in the string s by k positions in the alphabetical order. For example, 
    Shifting 'a' by 3 positions results in 'd'.
    Shifting 'w' by 6 positions results in 'c'.
  • Convert every character in the new string from lowercase to uppercase. For example,
    'g' becomes 'G'.

As an elephant, it’s essential to learn EECS. Now, given a word s of length 5 and a shift distance k, output the encrypted string after applying the EECS.

You can try solving the problem without needing to know the exact ASCII values of the letters.

 

Input

The first line contains a single integer k.

1 ≤ k ≤ 26

The second line contains a single string s.

It is guaranteed that all characters in s are lowercase letters and the length of the string is 5.

Output

Output the encrypted string.

Note that you do NOT need to print '\n' at the end of the output.

Sample Input  Download

Sample Output  Download




Discuss




14398 - Time machine   

Description

In the year 2486, elephants successfully invented a time machine. However, to prevent its misuse, the Time Police established a rule: It can only be used to travel to the past, and the destination must be less than 24 hours of the present time. The elephants ask for your help to test the time machine. You know the time before you were sent (now) and the time after you arrive (past). How long was the time interval between these two moments?

Input

The first line contains three integers, H1, M1, and S1, representing the time before teleportation (now).

The second line contains three integers, H2, M2, and S2, representing the time after teleportation (past).

0 ≤ H1, H2 ≤ 23

0 ≤ M1, M2 ≤ 59

0 ≤ S1, S2 ≤ 59

The time format is: HH MM SS

Output

Output a single line that contains three integer, represent the time interval between teleport.

Please follow the format: HH MM SS, and also, the time should be in the range below.

0 ≤ HH ≤ 23

0 ≤ MM ≤ 59

0 ≤ SS ≤ 59

There should be NO space and '\n' at the end of the output.

 

Sample Input  Download

Sample Output  Download




Discuss




14453 - Water distribution II   

Description

Alice has L liters of water and wants to pour it into bottles. Each bottle holds m liters, and Alice will get n dollars whenever she fill a bottle. Help Alice find out how many dollars she can get.

Input

The first line contains three integers: L, m, n (1 <= L, m, n <= 1000), separated by blanks.

Output

Print an integer in a single line: how many dollars Alice can get. (No need to use '\n')

Sample Input  Download

Sample Output  Download




Discuss




14886 - 67   

Description

You cannot escape from 67, even in this homework.

Given a number N, please add N with 67 then print out the result. Note that there is a newline after your result.

Constraints

  • -1000000 <= N <= 1000000

 

Input

Output

Sample Input  Download

Sample Output  Download




Discuss




14887 - Scratcher Ticket   

Description

Given multiple rounds of a game, you are required to calculate the final balance of a player. In each round, three integers are provided: the player's value A, the dealer's value B, and the prize amount P.

The rules for each round are as follows:

  • If the player's value is greater than the dealer's value, the player wins the prize amount.

  • If the player's value is less than the dealer's value, the player loses the prize amount.

  • If both values are equal, no money is won or lost.

The player starts with a balance of 10,000. If the player's balance drops to 0 or becomes negative at any point, the game must stop immediately. In this case, output with '\n' for the current round. For all subsequent rounds, no matter what happens, output "No balance" with '\n' for each input line. If the player survives all rounds, just output the final balance with '\n'.

Constraints

0 <= A <= 109

0 <= B <= 109

0 <= P <= 1016

 

Input

There are multiple lines. Each contains three integers: A (player), B (dealer), and P (prize).

Output

If the player survive all rounds, then just output a single integer representing the total accumulated balance, followed by a newline character.

If the player's balance drops to 0 or becomes negative at any point, output with '\n' for the current round. For all subsequent rounds, output "No balance" with '\n' for each input line.

Sample Input  Download

Sample Output  Download




Discuss