Code
#include <stdio.h>
int main()
{
int n;
scanf("%d", &n);
int i = 1, ans = 0, delta = 1, cnt = 0;
while (i <= n)
{
ans++;
cnt++;
if (cnt == 2)
delta++, cnt = 0;
i += delta;
}
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:44:42
- Judged At
- 2025-06-13 16:44:42
- Judged By
- Score
- 10
- Total Time
- 1ms
- Peak Memory
- 284.0 KiB