随笔分类 - 小白学习
摘要:Description In ``Hangman Judge,'' you are to write a program that judges a series of Hangman games. For each game, the answer to the puzzle is given a
阅读全文
摘要:Description In this problem you are to generate a triangular wave form according to a specified pair of Amplitude and Frequency. The input begins with
阅读全文
摘要:Description Your mission, if you decide to accept it, is to create a maze drawing program. A maze will consist of the alphabetic characters A-Z, *(ast
阅读全文
摘要:这道题的难点在于怎么确定读取一行数据,用fgets读取数据流中的所有字符。 fgets(s,size,stdin);//从标准输入流中读取一行数据到s[]里面去。
阅读全文
摘要:Description An imaging device furnishes digital images of two machined surfaces that eventually will be assembled in contact with each other. The roug
阅读全文
摘要:#include<stdio.h> int main(){ char c; int j; while((c = getchar())!= EOF){ if(c != '\n'){ putchar(c-7); } else putchar(c); } return 0; }
阅读全文
摘要:#include<bits/stdc++.h>using namespace std;int main(){ int n=0; char a; int flag=1; while((scanf("%c",&a)!=EOF)) { if(a>='a'&&a<='z'||a>='A'&&a<='Z')
阅读全文
摘要:#include using namespace std; int main() { int n,m; unsigned long long int a,b,c,sum; while((scanf("%d",&n)!=EOF)) { for(int i=0;i>m; sum=0; for(int i=...
阅读全文
摘要:#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int v=0; int e=0 ; for(int i=0;i<=n-2;i++) { v+=i*(n-i-2); e+=(i*(n-i-2)+1);
阅读全文
摘要:#include<bits/stdc++.h> using namespace std; struct pos { double x; double y; }; //计算三角形的有向面积 double area(double x0,double y0,double x1,double y1,doub
阅读全文
摘要:#include<bits/stdc++.h> using namespace std; int main() { int flag[100]; int prime[100]; memset(flag,true,sizeof(flag)); memset(prime,0,sizeof(prime))
阅读全文
摘要:题目描述 如下数列,前5项分别是1/1,1/2,2/1,3/1,2/2……。输入n,输出第n项。 1/1 1/2 1/3 1/4 1/5 2/1 2/2 2/3 2/4 3/1 3/2 3/3 4/1 4/2 5/1 样例输入 3 14 7 12345 样例输出 2/1 2/4 1/4 59/99
阅读全文