Cod sursa(job #2632981)
Utilizator | Data | 6 iulie 2020 03:10:43 | |
---|---|---|---|
Problema | Cifra | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.53 kb |
#include <bits/stdc++.h>
using namespace std;
char v[] = {"0152839287784738415445962736211281728598893061706556251629322374051409906950637667184958433403940710"};
int main()
{
ifstream fin("cifra.in");
ofstream fout("cifra.out");
int tests;
fin >> tests;
while (tests-- > 0)
{
string s;
fin >> s;
int pos = (s.back() - '0');
s.pop_back();
if (!s.empty())
pos = pos * 10 + (s.back() - '0');
fout << v[pos] << "\n";
}
return 0;
}