摘要:
PTA 1 #include <stdio.h> 2 int main(){ 3 //无符号整型才能表达32位二进制数对应的十进制数 4 unsigned int decimalNum; 5 unsigned int digitsCount=0; 6 scanf("%u", &decimalNum) 阅读全文
posted @ 2019-04-23 19:18
cxc1357
阅读(198)
评论(0)
推荐(0)
摘要:
PTA 7-46 爬动的蠕虫 1 #include<stdio.h> 2 int main() { 3 int N,U,D,R,T=0; 4 scanf("%d%d%d",&N,&U,&D); 5 R = N-U; 6 if(R<=0) T=1; 7 else { 8 T = R/(U-D)*2+1 阅读全文
posted @ 2019-04-23 18:56
cxc1357
阅读(247)
评论(0)
推荐(0)
摘要:
PTA 7-45 找完数 网友“云上明月”的程序: 1 #include<stdio.h> 2 int isPerfect(int num); 3 4 int main() { 5 int i,j,m,n,exist=0; 6 int maxFactor; 7 scanf("%d%d",&m,&n) 阅读全文
posted @ 2019-04-23 10:52
cxc1357
阅读(758)
评论(0)
推荐(0)
摘要:
我的程序,一个用例通不过 1 #include<stdio.h> 2 void sort(int *a,int n); 3 4 int main() { 5 int num,a,b,c,count=1; 6 scanf("%d",&num); 7 while(num!=495&&num!=0) { 阅读全文
posted @ 2019-04-23 09:46
cxc1357
阅读(469)
评论(0)
推荐(0)

浙公网安备 33010602011771号