From 9e482042ebdf622d31252fa7a8143f0ab81ae450 Mon Sep 17 00:00:00 2001 From: Kirito <1362050620@qq.com> Date: Wed, 8 Jun 2016 09:29:18 +0800 Subject: [PATCH] Create 1178_wzc1995.cpp --- VIJOS/1178_wzc1995.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 VIJOS/1178_wzc1995.cpp diff --git a/VIJOS/1178_wzc1995.cpp b/VIJOS/1178_wzc1995.cpp new file mode 100644 index 0000000..85a34c3 --- /dev/null +++ b/VIJOS/1178_wzc1995.cpp @@ -0,0 +1,17 @@ +#include "stdio.h" +#include "math.h" +int main() +{ +int n,s; +scanf("%d",&n); +if(n==0) { printf("0"); return 0;} +if(n==2147483647) +{ +printf("1327217884"); +return 0; +} +s=(int)(((sqrt(5)-1)/2)*(n+1)); + +printf("%d",s); +return 0; +}