Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
141226 唐诗阳 最简真分数 C++ Compile Error 0 MS 0 KB 670 2025-12-21 15:18:05

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; bool gys(int x,int y){ if(x>y) return 0; int z; z=x%y; while(z){ x=y; y=z; z=x%y; } if(y==1) return 1; return 0; } int main(){ int n,a[600],s=0; cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; } for(int i=1;i<=n;i++){ for(int j=i+1;j<=n;j++){ s+=gys(i,j); } } cout<<s; return 0; }


Run Info:

Main.cc:7:5: error: stray '\357' in program
     if(x>y)    return 0;
     ^
Main.cc:7:5: error: stray '\274' in program
Main.cc:7:5: error: stray '\233' in program
Main.cc: In function 'bool gys(int, int)':
Main.cc:8:5: error: expected ';' before 'int'
     int z;
     ^