Code
#include <stdio.h>
int main()
{
int n;
scanf("%d",&n);
int i = 1, ans = 0, delta=1, cnt = 0;
while (i<=n)
{
ans++;
i+=delta;
cnt++;
if (cnt==2)
delta++,cnt=0;
}
printf("%d\n", ans);
}
Information
- Submit By
- Type
- Pretest
- Problem
- P1191 A. Balanced Product
- Language
- C11 (GCC 13.2.0)
- Submit At
- 2025-06-13 16:41:38
- Judged At
- 2025-06-13 16:41:38
- Judged By
- Score
- 0
- Total Time
- 1ms
- Peak Memory
- 284.0 KiB