daka

 

 

#include<bits/stdc++.h>
using namespace std;

int main(){
    double sum = 0;
    int i;
    for (i = 1;i <= 64;i++)
    {
        sum = sum + po(2,i - 1);
    }
    cout << sum;
}

 

 

#include<bits/stdc++.h>
using namespace std;

int main( )
{
    int x, y, z,number = 0;
    for(x = 0; x <= 10; x ++ ){
        y = 20 - 2 * x;
        z = 30- x - y;
        if (3*x + 2*y + z == 50)
            printf("%2d:%4d%5d%6d\n", ++number, x , y, z); 
    }
}

 

posted @ 2023-05-26 18:05  kxzzow  阅读(43)  评论(0)    收藏  举报