/ Randle /

记录详情

Compile Error

/in/foo.cc:12:14: error: stray '\342' in program
     while(ch<‘0‘||ch>‘9‘){if(ch==‘-‘)f=-1; ch=getchar();}
              ^
/in/foo.cc:12:15: error: stray '\200' in program
     while(ch<‘0‘||ch>‘9‘){if(ch==‘-‘)f=-1; ch=getchar();}
               ^
/in/foo.cc:12:16: error: stray '\230' in program
     while(ch<‘0‘||ch>‘9‘){if(ch==‘-‘)f=-1; ch=getchar();}
                ^
/in/foo.cc:12:18: error: stray '\342' in program
     while(ch<‘0‘||ch>‘9‘){if(ch==‘-‘)f=-1; ch=getchar();}
                  ^
/in/foo.cc:12:19: error: stray '\200' in program
     while(ch<‘0‘||ch>‘9‘){if(ch==‘-‘)f=-1; ch=getchar();}
                   ^
/in/foo.cc:12:20: error: stray '\230' in program
     while(ch<‘0‘||ch>‘9‘){if(ch==‘-‘)f=-1; ch=getchar();}
                    ^
/in/foo.cc:12:26: error: stray '\342' in program
     while(ch<‘0‘||ch>‘9‘){if(ch==‘-‘)f=-1; ch=getchar();}
                          ^
/in/foo.cc:12:27: error: stray '\200' in program
     while(ch<‘0‘||ch>‘9‘){if(ch==‘-‘)f=-1; ch=getchar();}
                           ^
/in/foo.cc:12:28: error: stray '\230' in program
     while(ch<‘0‘||ch>‘9‘){if(ch==‘-‘)f=-1; ch=getchar();}
                            ^
/in/foo.cc:12:30: error: stray '\342' in program
     while(ch<‘0‘||ch>‘9‘){if(ch==‘-‘)f=-1; ch=getchar();}
                              ^
/in/foo.cc:12:31: error: stray '\200' in program
     while(ch<‘0‘||ch>‘9‘){if(ch==‘-‘)f=-1; ch=getchar();}
                               ^
/in/foo.cc:12:32: error: stray '\230' in program
     while(ch<‘0‘||ch>‘9‘){if(ch==‘-‘)f=-1; ch=getchar();}
                                ^
/in/foo.cc:12:42: error: stray '\342' in program
     while(ch<‘0‘||ch>‘9‘){if(ch==‘-‘)f=-1; ch=getchar();}
                                          ^
/in/foo.cc:12:43: error: stray '\200' in program
     while(ch<‘0‘||ch>‘9‘){if(ch==‘-‘)f=-1; ch=getchar();}
                                           ^
/in/foo.cc:12:44: error: stray '\230' in program
     while(ch<‘0‘||ch>‘9‘){if(ch==‘-‘)f=-1; ch=getchar();}
                                            ^
/in/foo.cc:12:46: error: stray '\342' in program
     while(ch<‘0‘||ch>‘9‘){if(ch==‘-‘)f=-1; ch=getchar();}
                                              ^
/in/foo.cc:12:47: error: stray '\200' in program
     while(ch<‘0‘||ch>‘9‘){if(ch==‘-‘)f=-1; ch=getchar();}
                                               ^
/in/foo.cc:12:48: error: stray '\230' in program
     while(ch<‘0‘||ch>‘9‘){if(ch==‘-‘)f=-1; ch=getchar();}
                                                ^
/in/foo.cc:13:15: error: stray '\342' in program
     while(ch>=‘0‘&&ch<=‘9‘) x=x*10+ch-‘0‘,ch=getchar();
               ^
/in/foo.cc:13:16: error: stray '\200' in program
     while(ch>=‘0‘&&ch<=‘9‘) x=x*10+ch-‘0‘,ch=getchar();
                ^
/in/foo.cc:13:17: error: stray '\230' in program
     while(ch>=‘0‘&&ch<=‘9‘) x=x*10+ch-‘0‘,ch=getchar();
                 ^
/in/foo.cc:13:19: error: stray '\342' in program
     while(ch>=‘0‘&&ch<=‘9‘) x=x*10+ch-‘0‘,ch=getchar();
                   ^
/in/foo.cc:13:20: error: stray '\200' in program
     while(ch>=‘0‘&&ch<=‘9‘) x=x*10+ch-‘0‘,ch=getchar();
                    ^
/in/foo.cc:13:21: error: stray '\230' in program
     while(ch>=‘0‘&&ch<=‘9‘) x=x*10+ch-‘0‘,ch=getchar();
                     ^
/in/foo.cc:13:28: error: stray '\342' in program
     while(ch>=‘0‘&&ch<=‘9‘) x=x*10+ch-‘0‘,ch=getchar();
                            ^
/in/foo.cc:13:29: error: stray '\200' in program
     while(ch>=‘0‘&&ch<=‘9‘) x=x*10+ch-‘0‘,ch=getchar();
                             ^
/in/foo.cc:13:30: error: stray '\230' in program
     while(ch>=‘0‘&&ch<=‘9‘) x=x*10+ch-‘0‘,ch=getchar();
                              ^
/in/foo.cc:13:32: error: stray '\342' in program
     while(ch>=‘0‘&&ch<=‘9‘) x=x*10+ch-‘0‘,ch=getchar();
                                ^
/in/foo.cc:13:33: error: stray '\200' in program
     while(ch>=‘0‘&&ch<=‘9‘) x=x*10+ch-‘0‘,ch=getchar();
                                 ^
/in/foo.cc:13:34: error: stray '\230' in program
     while(ch>=‘0‘&&ch<=‘9‘) x=x*10+ch-‘0‘,ch=getchar();
                                  ^
/in/foo.cc:13:47: error: stray '\342' in program
     while(ch>=‘0‘&&ch<=‘9‘) x=x*10+ch-‘0‘,ch=getchar();
                                               ^
/in/foo.cc:13:48: error: stray '\200' in program
     while(ch>=‘0‘&&ch<=‘9‘) x=x*10+ch-‘0‘,ch=getchar();
                                                ^
/in/foo.cc:13:49: error: stray '\230' in program
     while(ch>=‘0‘&&ch<=‘9‘) x=x*10+ch-‘0‘,ch=getchar();
                                                 ^
/in/foo.cc:13:51: error: stray '\342' in program
     while(ch>=‘0‘&&ch<=‘9‘) x=x*10+ch-‘0‘,ch=getchar();
                                                   ^
/in/foo.cc:13:52: error: stray '\200' in program
     while(ch>=‘0‘&&ch<=‘9‘) x=x*10+ch-‘0‘,ch=getchar();
                                                    ^
/in/foo.cc:13:53: error: stray '\230' in program
     while(ch>=‘0‘&&ch<=‘9‘) x=x*10+ch-‘0‘,ch=getchar();
                                                     ^
/in/foo.cc: In function 'long long int read()':
/in/foo.cc:12:49: error: expected primary-expression before ')' token
     while(ch<‘0‘||ch>‘9‘){if(ch==‘-‘)f=-1; ch=getchar();}
                                                 ^

代码

#include<cmath>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<iostream>
#include<algorithm>
using namespace std;
long long n,ans;
long long read()
{
    long long x=0,f=1; char ch=getchar();
    while(ch<‘0‘||ch>‘9‘){if(ch==‘-‘)f=-1; ch=getchar();}
    while(ch>=‘0‘&&ch<=‘9‘) x=x*10+ch-‘0‘,ch=getchar();
    return x*f;
}
int main()
{
    n=read();
    ans=sqrt(n);
    if(ans==n/ans) ans=ans*2-1;
    else ans=ans*2;
    printf("%lld",ans);
}

信息

递交者
类型
递交
题目
整除 T2
题目数据
下载
语言
C++
递交时间
2017-10-15 20:16:36
评测时间
2017-10-15 20:16:36
评测机
分数
0
总耗时
419ms
峰值内存
37.473 MiB