Cod sursa(job #848851)

Utilizator pakko13Igor Atamanciuc pakko13 Data 5 ianuarie 2013 20:05:08
Problema Suma si numarul divizorilor Scor 0
Compilator cpp Status done
Runda Arhiva educationala Marime 0.4 kb
#include <iostream>
#include <fstream>

using namespace std;
int main () 
{   int s,a,t,b;
ifstream file0;
ofstream file;
file0.open ("suma.txt");
file.open ("suma3.txt" );
file0 >> t;
for ( t;t!=0;t--){
file0 >> a;  b=0;s=0; 
      for (int i=1;i<=a;i++) { 
                         if (a%i==0) { ++b;s=s+i;};}
  file << b <<" " << s%9973<<endl;}
file.close ();
file0.close () ;
 return 0;
}