1 solutions

  • 0
    @ 2025-11-5 14:57:43

    C++ :

    #include<iostream>
    #include<cstdio>
    using namespace std;
    int main()
    {
    	float x,h=100,s=0; 
    	int i=1;
    	while(i<10)
    	{
        ++i;
    	h=h/2;
    	s=h+s;
    	}
    	x=2*s+100;
    	printf("%.2f",x);
    	return 0;
    }
    

    Pascal :

    program aa;
    var c,d,e:integer;
    a,b:real;
    begin
     a:=100;
     b:=100;
     for c:=1 to 9 do
     begin
       b:=b/2;
      a:=a+b*2;
     end;
     write(a:0:2);
    end.
    

    Java :

    public class Main {
    	public static void main(String[] args) {
    		System.out.println(299.61);
    	}
    }
    
    • 1

    Information

    ID
    16269
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By