璟雯院

珺璟如晔,雯华若锦

用户工具

站点工具


icpc:problems:luogup7226
problems
名称POT
题目编号P7226
题目链接luogu.com.cn/…
来源Luogu
算法分类入门_循环
难易程度入门

POT

想法

循环与模拟。

代码实现

#include <cstdio>
 
int main() {
    int n;
    long long int sum = 0;
    scanf("%d", &n);
    for(int i=1; i<=n; i++) {
        int p, temp, t = 1;
        scanf("%d", &temp);
        p = temp % 10;
        temp /= 10;
        for(int j=1; j<=p; j++)
            t *= temp;
        sum += t;
    }
    printf("%lld", sum);
    return 0;
}
/app/www/public/data/pages/icpc/problems/luogup7226.txt · 最后更改: 2024/04/18 15:14 由 温婕莺