F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_14152460_2059.cpp:1:646: fatal error: GCC4.9.2/lib/gcc/x86_64-w64-mingw32/4.9.2/include/stdio.h>in: Invalid argument
 #include<stdio.h>int common[10];int num1;int num2;/*初始化*/void init(){ int i; for(i=0;i<10;i++)  common[i]=0; num2=0;}/*求公约数函数*/void get_common(int n){ int i=0; int j=0; int x=2; for(;x<=n;x++) {  while(n%x==0)  {   common[i]=x;   if(j==0)//这是while循环的第一个    i++;   n=n/x;   j=1;  }  j=0; } num1=i-1;}/*判断新旧朋友*/void judge(int x){ int i; for(i=0;i<=num1;i++) {  if(x%common[i]==0)  {   num2++;   return;  } }}void main() { int i,j; int x,y; printf("输入总数\n"); scanf("%d",&y); for(j=1;j<=y;j++) {  printf("输入测试数:\n");  scanf("%d",&x);  init();  get_common(x);  for(i=2;i<=x;i++)   judge(i);  printf("%d\n",x-num2); }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ^
compilation terminated.


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-17 10:05:25, Gzip enabled