<PREV Problem:
NEXT>
Solved by 590 users: ...
UserDateAttemptTimeCMSC
stasg703 dec 2009Ruby400.028 
stasg703 dec 2009Ruby500.028 
xtender05 may 2010Perl500.058 
xtender05 may 2010Perl1100.058 
stasg703 dec 2009Ruby200.0210 
david_it2113 dec 2009Ruby200.0210 
stasg703 dec 2009Ruby300.0210 
bush11 jan 2013Ruby500.0212 
bush11 jan 2013Ruby600.0212 
bush11 jan 2013Ruby300.0215 
bush11 jan 2013Ruby400.0219 
VBart31 may 2010Python300.0625 
VBart31 may 2010Python500.0625 
VBart31 may 2010Python200.0626 
pshen19 nov 2010C2000.0127 
kronos09 sep 2009Ruby300.0228 
kronos09 sep 2009Ruby100.0230 
pshen19 nov 2010C++5300.0131 
leviato26 may 2010C800.0132 
leviato26 may 2010C900.0132 
leviato09 jun 2010C1100.0132 
pshen19 nov 2010C1400.0133 
leviato26 may 2010C600.0134 
gorlum030 oct 2010Ruby100.0235 
abortmozga.ru11 may 2010C++200.0137 
pshen19 nov 2010C1200.0137 
pshen19 nov 2010C++5100.0138 
Languages
C++
313
C
199
Java
26
FPC
20
Kylix
18
Python
10
Ruby
9
Perl
2
Lua
1
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 

Conjunction and disjunction [Educational]

Time limit = 1 second(s)

Calculate disjunction or conjunction of 2 boolean variables

^ is conjunction (AND)

v is disjunction (OR)

Input.

2 logical variables (0 or 1), symbol "v" or "^" between them without spaces

Output.

1 number (0 or 1) — result.

Input#1
1^0
Output#1
0
Input#2
1v0
Output#2
1

Author:
Simple educational problem. Tests and description by Dmitry Podlesnykh
07 September 2009

<PREV | Problem set | Search related messages | NEXT>


© acm.mipt DevGroup
The page was generated in 190ms

SW soft NIX
ID = 18.208.202.194