3219 - EE2310 Week2 Practice Scoreboard

Time

2025/09/08 08:00:00 2025/12/31 23:59:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
14685 Sum of four-digit integer
14686 Multiple determination
14687 Sum of integers
14688 Determine the catogories of triangles

14685 - Sum of four-digit integer   

Description

Write a program that reads a four-digit positive integer and computes the sum of its digits.

For example, if the input is 1234, then the output should be 10.

Input

Four integer

Output

The sum of the four integers

Sample Input  Download

Sample Output  Download




Discuss




14686 - Multiple determination   

Description

Write a program that reads a positive integer.

  • If the integer is a multiple of 3 but not a multiple of 5, output 1.

  • If the integer is a multiple of 5 but not a multiple of 3, output 1.

  • In all other cases, output 0.

For example:

  • If the input is 36 or 20, the output should be 1.

  • If the input is 30 or 7, the output should be 0.

Input

A positive integer

Output

The result of the rules.

 

If the input is 36 or 20, the output should be 1.

If the input is 30 or 7, the output should be 0.

Sample Input  Download

Sample Output  Download




Discuss




14687 - Sum of integers   

Description

Write a program that reads two integers a and b, and computes the sum of all integers from a to b

Input

Input two integers

Output

Sum of all integers between two inputs.

Sample Input  Download

Sample Output  Download




Discuss




14688 - Determine the catogories of triangles   

Description

Write a program that reads three positive integers a, b, and c, and determines whether the triangle with side lengths a, b, and c is an acute triangle, an obtuse triangle, or a right triangle.

  • If it is an acute triangle, output 1.

  • If it is an obtuse triangle, output 2.

  • If it is a right triangle, output 3.

You may assume that the input values a, b, and c can always form a valid triangle.

Input

three positive integers ab, and c

Output

If it is an acute triangle, output 1.

If it is an obtuse triangle, output 2.

If it is a right triangle, output 3.

Sample Input  Download

Sample Output  Download




Discuss