ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1083. Factorials!!!

Compilation Error
Posted by GuGo1991 7 Nov 2012 19:31
It works but here i get Compilation Error

#include <iostream>
using namespace std;

int main(){
    int num, val, numMod;
    string nFuc;
    cin >> num >> nFuc;

    int i = nFuc.length();

    int mod = num % i;
    if(mod != 0){
        numMod = num;
        val = numMod;
        while(numMod != mod){
            numMod -= i;
            val *= numMod;
            }
        }

    else if(mod == 0){
        numMod = num;
        val = numMod;
        while(numMod > i){
            numMod -= i;
            val *= numMod;
            }
        }

    cout << val << endl;
}
Re: Compilation Error
Posted by Sunnat 11 Nov 2012 14:01
#include<string>
Re: Compilation Error
Posted by GuGo1991 13 Nov 2012 13:27
TY ))