都说要用高精度,这是数据太水了么,怎么没用也过了,语言为c++
查看原帖
都说要用高精度,这是数据太水了么,怎么没用也过了,语言为c++
1074084
asd890123楼主2024/4/10 17:06
#include "stdio.h"
#include "math.h"
#include "string.h"

int main(){
    
    int n;
    char ans[10000];
    
    scanf("%d",&n);
    sprintf(ans,"%.0LF",pow(2.0L,n + 1));
    ans[strlen(ans) - 1] -= 2;
    printf(ans);
    
    return 0;
}
2024/4/10 17:06
加载中...