Level 1-1, 3 questions
Rokua's first task description: Take the first step and learn the language and the Rokua. It won't be hard to go with the books and teachers.
To complete this task, please AC down the following topics (i.e. through this topic):
1.a+b problem
2. Xiao Yu buys stationery
3. Swimming time for small fish
Practice should be gradual, can not be too anxious Oh! Of course Rokua is also allowed to skip certain levels under certain conditions. You can skip up to 3 times.
Achievement time: 2015-07-14-18:12
1.a+b problem (P1001)
HHhH ... Classic water problem.
1 #include <iostream>2 using namespace Std; 3 Main () 4 { 5 A, b 6 cin>>a>>B; 7 cout<<a+b<<ENDL; 8 return 0 9 }
What do you want to do with this? What Ghost network stream algorithm? Never read it.
(Only remember that someone originally claimed to write the network stream a+b in a corner riga Writlen (a+b); Halt;
Hhh
2. Xiao Yu buy stationery P1421
The class teacher gave little Jade a task, to the stationery shop to buy as much as possible to sign pens. It is known that the price of a signed pen is 1.9 yuan, and the head teacher to the small jade money is a yuan B angle, small jade want to know, she can buy how many only signed pen it.
1#include <iostream>2 using namespacestd;3 intMain ()4 {5 intb;6Cin>>a>>b;7 DoubleC;8c=a+b*0.1;9c=c/1.9;Ten intD; OneD=C; Acout<<d<<Endl; - return 0; -}
int D;
D=c;
Isn't that creepy enough? HHhH
3. Fish Swim Time P1425
The London Olympics is coming, the little fish are desperately practicing swimming ready to participate in swimming competitions, poor little fish do not know that fish can not participate in the human Olympic Games. This day, the small fish to their own swimming time to do a precise timing (in the case of the timing are calculated according to 24-hour clock), it found himself from a when the B-point has been swimming to the day of the C-point, please help small fish calculate, it this day total swim how much time? Small fish swim good hard ah, you can not be counted wrong oh.
1#include <iostream>2 using namespacestd;3 intMain ()4 {5 inta,b,c,d;6Cin>>a>>b>>c>>D;7 inthrs,min;8hrs=c-A;9min=d-b;Ten if(min<0) One { Amin+= -; -hrs--; - } the Else if(min> -) - { -min-= -; -hrs++; + } -cout<" "<<min<<Endl; + return 0; A}
+= -= ++ --
Who's counting with you for a minute? Conversion play,
HHhH
"Luogu OJ" "C + +" level 1-1