Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int ilosc, n[30];
- long wynik;
- int main() {
- cin >> ilosc;
- for(int i = 0; i < ilosc; i++) cin >> n[i];
- for(int i = 0; i < ilosc; i ++) {
- wynik = 1;
- for(int j = 1; j < n[i]+1; j++) {
- wynik = wynik *j;
- }
- cout << wynik/10%10 << " " << wynik%10 << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement