// PascalABC.NET 3.0, сборка 1156 от 30.01.2016 begin var s:=ReadlnString('Вводите:'); s:=s.Replace('AND','OR'); s:=s.Replace('And','Or'); s:=s.Replace('and','or'); Writeln; Writeln(s) end.
Тестовое решение: Вводите: And for the Birds? Mowgli let out a kite’s whistle. And now for the Snake People. The answer was a perfect hiss. Mowgli clapped his hands happily and jumped on Bagheera’s back.
Or for the Birds? Mowgli let out a kite’s whistle. Or now for the Snake People. The answer was a perfect hiss. Mowgli clapped his hors happily or jumped on Bagheera’s back.
#include <iostream>
using namespace std;
int k=2;
bool StrangeSeq(int n){
if (k<n){
if(n%k==0){
cout<<"false";
return false;
}
k++;
StrangeSeq(n);
}
else
{
cout<<"true";
return true;
}
}
int main(){
int n;
cin>>n;
StrangeSeq(n);
cin.get();
cin.get();
}
begin
var s:=ReadlnString('Вводите:');
s:=s.Replace('AND','OR');
s:=s.Replace('And','Or');
s:=s.Replace('and','or');
Writeln;
Writeln(s)
end.
Тестовое решение:
Вводите: And for the Birds? Mowgli let out a kite’s whistle. And now for the Snake People. The answer was a perfect hiss. Mowgli clapped his hands happily and jumped on Bagheera’s back.
Or for the Birds? Mowgli let out a kite’s whistle. Or now for the Snake People. The answer was a perfect hiss. Mowgli clapped his hors happily or jumped on Bagheera’s back.