mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
Create 1178_wzc1995.cpp
This commit is contained in:
parent
4838551fe1
commit
9e482042eb
17
VIJOS/1178_wzc1995.cpp
Normal file
17
VIJOS/1178_wzc1995.cpp
Normal file
|
@ -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;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user