1 solutions

  • 0
    @ 2025-11-5 16:30:50

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    double n,a,aa;
    double s;
    int main()
    {
    	cin>>n;
    	for(int i=1;i<=n;i++)
    	{
    		cin>>a>>aa;
    		s=s+(a*aa/10);
    	}
    	printf("%.2f",s);
    	return 0;
    }
    

    Pascal :

    var s:real;
        a,b,i,n:longint;
    begin
      readln(n);
      for i:=1 to n do
      begin
        readln(a,b);
        s:=s+a*b/10;
      end;
      writeln(s:0:2);
    end.
    
    • 1

    Information

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