บรรจุวงกลม (circle-packing) Author: Pakin Olanraktham View Problem Statement Source: PROGRAMMING.IN.TH Difficulty: ? Prerequisites: การเขียนโปรแกรมเบื้องต้น เฉลย CC++ #include <stdio.h> int main() { int n; scanf("%d", &n); if (n < 3) printf("2.000000"); else if (n > 3) printf("%d %d", n, (n%2==0?".000000":".464102")); else printf("3.732051"); } #include <iostream> using namespace std; int main() { int n; cin >> n; if (n < 3) cout << "2.000000"; else if (n > 3) cout << n << (n%2==0?".000000":".464102"); else cout << "3.732051"; }