PRF192_-_PE_-_FA_2024_3201.webp
G

PRF192_-_PE_-_FA_2024_3201.webp

  • Media owner Greed94
  • Ngày thêm
Problem 1
[3 Points]
Output
4
Enter a 4-digit positive integer, calculate the sum of all odd digits in the given number.
Input
Users are required to enter a 4-digit positive integer N using the keyboard (STDIN).
Constraint
• N (1000≤ N ≤9999)
Output
Please print out the sum of all odd digits of the positive integer N.
Sample
Sample 1
1234
Sample 2
Input
2468
Problem 2
[4 Points]
Enter a positive integer N and then enter N elements of an array. Find the largest prime number in the array. If there is no prime number, print 0.
Definition
A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself.
For example, 2, 3, 5, 7, and 11 are prime numbers.
Input
Zoom
+ 100%
Close
Chưa có bình luận nào.

Thông tin

Category
PRF192
Thêm bởi
Greed94
Ngày thêm
Lượt xem
2,489
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRF192_-_PE_-_FA_2024_3201.webp
File size
366.2 KB
Dimensions
2880px x 1358px

Share this media

Back
Bên trên Bottom