Cod sursa(job #2482684)

Utilizator TheRealGamerFat Vlad TheRealGamer Data 28 octombrie 2019 18:51:27
Problema Fractii Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.31 kb
#include <iostream>
#include <fstream>
using namespace std;

ifstream in("fractii.in");
ofstream out("fractii.out");

int main(){
    int n, i, j, k = 0;
    in>>n;
    for(i = 1; i <= n; i++)
        for(j = 1; j <= n; j++)
            if(i % 2 != 0 || j == 1)
                k++;
    out<<k;
}