Search found 53 matches

by oulongbin
Wed Jul 28, 2004 8:22 am
Forum: Volume 104 (10400-10499)
Topic: 10409 - Die Game
Replies: 7
Views: 4330

Thank you.now i got AC.
by oulongbin
Tue Jul 27, 2004 5:20 am
Forum: Volume 1 (100-199)
Topic: 160 - Factors and Factorials
Replies: 205
Views: 25200

WA 160 Why ?

this is my code : [cpp] #include <iostream> using namespace std; #include <cstdio> #include <cmath> bool prime(int n) { int j,k; k=int(sqrt(n)); for(j=2;j<=k;j++) if(n%j==0)break; if(j>k) return true; else return false; } int main() { int prim[100]; int n; int count; int i; bool flag; while(cin>>n&&...
by oulongbin
Mon Jul 26, 2004 1:59 pm
Forum: Volume 102 (10200-10299)
Topic: 10219 - Find the ways !
Replies: 33
Views: 10401

10219

can somebody give me some samples? thank you ! i don't know why i am wrong. [cpp] #include <iostream> using namespace std; int main() { long i,n,k; double temp,tt; long count; while(cin>>n>>k) { if(n<k) { long j=n; n=k; k=j; } count=1; temp=1; tt=n; for(i=0;i<k;i++) { temp*=tt; tt--; while(temp>=10)...
by oulongbin
Fri Jul 16, 2004 10:09 am
Forum: Volume 104 (10400-10499)
Topic: 10409 - Die Game
Replies: 7
Views: 4330

10409 WA

Why i always got WA??I don't the reason. [cpp] #include <iostream> using namespace std; #include <cstring> int main() { int top=1,north=2,west=3; char str[6]; int tt,nn,ww,n; while(cin>>n&&n!=0) { cin.get(); tt=1,nn=2,ww=3; for(;n>0;n--) { cin>>str; switch(str[0]) { case 'n':top=7-nn;north=tt;break;...
by oulongbin
Thu Jul 15, 2004 8:20 am
Forum: Volume 100 (10000-10099)
Topic: 10008 - What's Cryptanalysis?
Replies: 55
Views: 17524

thank you very much.
now i got AC.
by oulongbin
Wed Jul 14, 2004 11:57 am
Forum: Volume 100 (10000-10099)
Topic: 10008 - What's Cryptanalysis?
Replies: 55
Views: 17524

10008

why i always got compile error?? [cpp] #include <iostream> using namespace std; #include <cstring> int main() { int n,count[26]; int caf[26]; for(int k=0;k<26;k++) { count[k]=0; caf[k]=k; } cin>>n; cin.get(); while(n--) { int len,i; char a[1000]; cin.getline(a,1000); len=strlen(a); strupr(a); for(i=...
by oulongbin
Sun Jul 11, 2004 8:36 am
Forum: Volume 4 (400-499)
Topic: 455 - Periodic Strings
Replies: 73
Views: 17095

455 please help me!!!

[cpp] #include <iostream> using namespace std; #include <cstring> int main() { int n,l,j,i,count,m; char a[1000]; cin>>n; cin.get(); for(int sum=0;sum<n;) { cin.getline(a,1000); if(a[0]=='\0') {sum++;cout<<endl;} else { l=strlen(a); if(l%2==0) { count=0; for(i=2;i<=l;i++) { if(l%i==0) { for(j=0;j<l/...
by oulongbin
Sun Jul 11, 2004 5:26 am
Forum: Other words
Topic: i am a newer.help me!thanx.
Replies: 0
Views: 626

i am a newer.help me!thanx.

i am a newer .
can someone give me a example of the "multiple input" in C++.
i do not know how to deal with it.
thank you very much.

Go to advanced search