Problem ID :z094. E. 貓咪與拉不拉多

New Thread

User NA (score:50)

yuhung94 SendIMessage
089487

z094. E. 貓咪與拉不拉多 | From: 114.136.18.220 | Post Date:2019-12-14 21:57:42.0

請問我的想法有錯嗎?
 
#include<iostream>
using namespace std;
int main(){
int t;
cin>>t;
while(t--){
int a,b;
cin>>a>>b;
//cout<<a<<" "<<b<<"\n";
if(b>=a) {cout<<"Kitty\n";continue;
}
if(a%(b+1)!=0) cout<<"Kitty\n";
else cout<<"Labrador\n";
}
}
 


文章類型: 一般 | Reply | Back

New Thread

ZeroJudge Forum