Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
119112 | 汤奕硕 | C语言6.19 | C++ | Accepted | 0 MS | 208 KB | 314 | 2025-05-15 20:04:15 |
#include <stdio.h> int main() { int n; scanf("%d", &n); int peaches = 1; // 第n天剩下的桃子数 // 从第n天倒推回第1天 for (int i = n - 1; i >= 1; i--) { peaches = (peaches + 1) * 2; } printf("%d\n", peaches); return 0; }