HUSTOJ
Home
ProblemSet
Source/Category
Contest
Status
Ranklist
F.A.Qs
Login
Register
1239: (2025)实验3-3 指针操作数组
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:505
Solved:215
Submit
Submit Record
Statistics
ShowOff!
Description
读入一个长度为n的整数型数组,通过指针遍历数组,将所有偶数替换为其平方,奇数替换为其立方,输出修改后的数组。其中n<15
Sample Input
Copy
5 1 2 3 4 5
Sample Output
Copy
1 4 27 16 125
Source/Category
自编讲义
实验内容
实验3
Submit
Submit Record
Statistics
ShowOff!