3641 - 谁在撒谎2
Time Limit : 1 秒
Memory Limit : 128 MB
甲:乙说的是真话
乙:丙说的是谎话
丙:我们3个说的都是谎话
编程求出到底谁说的是谎话。
Input
Output
假如甲乙丙都撒谎了,应输出000
Examples
Input Format
Output Format
Solution C++
#include <iostream> using namespace std; int main() { int i,j,k; for(i=0;i<=1;i++) for(j=0;j<=1;j++) for(k=0;k<=1;k++) { if((i==j)&&(j!=k)&&(k==0)) cout<<i<<j<<k<<endl; } return 0; }