Cod sursa(job #2943721)

Utilizator RaresHNDINeacsu Rares Andrei RaresHNDI Data 21 noiembrie 2022 16:13:30
Problema Suma si numarul divizorilor Scor 30
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.74 kb
/******************************************************************************

                              Online C++ Compiler.
               Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.

*******************************************************************************/

#include <iostream>
#include <fstream>
using namespace std;
int main()
{
    ifstream f("ssnd.in");
    ofstream g("ssnd.out");
    int t,nr,j;
    long long int n,s,i;
    
    f>>t;
   for(j=1;j<=t;j++){
       f>>n;
   s=0;nr=0;
       for(i=1;i<=n;++i){
           if(n%i==0){
               nr++; s=s+i;
           }
       }
       g<<nr<<" "<<s%9973<<endl;
   }
    f.close();
    g.close();
}