From 50ccef84883876f8d6f7bcc09546ff0c399756df Mon Sep 17 00:00:00 2001 From: Kirito <1362050620@qq.com> Date: Sun, 25 Sep 2016 23:04:53 +0800 Subject: [PATCH] Create 1846.cpp --- HDOJ/1846.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 HDOJ/1846.cpp diff --git a/HDOJ/1846.cpp b/HDOJ/1846.cpp new file mode 100644 index 0000000..b63f570 --- /dev/null +++ b/HDOJ/1846.cpp @@ -0,0 +1,23 @@ +#include +#include +#include +using namespace std; +int main() +{ + int t; + scanf("%d",&t); + while(t--) + { + int n,m; + scanf("%d %d",&n,&m); + if(n%(m+1)==0) + { + printf("second\n"); + } + else + { + printf("first\n"); + } + } + return 0; +}