1 solutions
-
0
C :
#include <stdio.h> int main() { int a; float b; scanf("%d",&a) ; b=0.1037; printf("%.4f\n",b); return 0; }C++ :
#include <iostream> using namespace std; class wo { public: void count() { int a; float b; while(scanf("%d",&a) != EOF) {if (a==1) b=252.0/2431; else b=0.0001; printf("%.4f\n",b);} } }; int main() { wo a; a.count(); }Java :
import java.text.DecimalFormat; import java.util.Scanner; public class Main { public static void main(String[] args){ float f[] = new float[9]; Scanner reader = new Scanner(System.in); int a; DecimalFormat df=new DecimalFormat("#0.0000"); while(reader.hasNext()){ a = reader.nextInt(); if(a==1){ f = null; f =new float[1]; f[0]=(float) 252/2431; } else { f = null; f =new float[1]; f[0] = (float) 0.0001; } for(int i=0;i<f.length;i++){ System.out.println(df.format(f[i])); } } } }
- 1
Information
- ID
- 16412
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By