#8957: 執行逾時?


54321 (魏子轩)

School : Not Student
ID : 41806
IP address : [222.66.36.254]
Last Login :
2014-11-26 15:30:37
c002. 10696 - f91 -- UVa10696 | From: [101.231.75.150] | Post Date : 2014-07-07 13:57

#include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
    int a;
    while(scanf("%d",&a)!=0)
    {
         if (a<=100)
            cout<<"f91("<<a<<") = 91"<<endl;
         else
             cout<<"f91("<<a<<") = "<<a-10<<endl;
    }
    return 0;
}
 
#8959: Re:執行逾時?


s87138013 (乂鐵雲乂)

School : 靜宜大學
ID : 14786
IP address : [125.230.3.132]
Last Login :
2015-10-15 11:31:11
c002. 10696 - f91 -- UVa10696 | From: [125.230.6.11] | Post Date : 2014-07-07 18:20

#include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
    int a;
    while(cin >> a)
    {
            if(a==0)
break;
            cout<<"f91("<<a<<") = " << (a<101?91:a-10) <<endl;
    }
    return 0;
}
 
ZeroJudge Forum