Cod sursa(job #3298761)
Utilizator | Data | 1 iunie 2025 14:39:09 | |
---|---|---|---|
Problema | Ridicare la putere in timp logaritmic | Scor | 10 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.24 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream f("lgput.in");
ofstream g("lgput.out");
int main(void) {
unsigned long long n, p;
f >> n >> p;
while (--p)
n += n;
g << n % 1999999973;
return 0;
}