Search found 6 matches

by try_tired
Sun Mar 16, 2014 12:12 am
Forum: Volume 7 (700-799)
Topic: 713 - Adding Reversed Numbers
Replies: 142
Views: 40207

Re: 713 - Adding Reversed Numbers

Why I got wrong ans: here.......... pls help. :( import java.io.*; import java.util.*; import java.math.*; public class Main { public static void main(String[] args)throws IOException { try{ String s,ss,sum1; StringBuffer s1,s11,sum2; BigInteger sum; long l1,l2,lf; int n,i; Scanner sc = new Scanner(...
by try_tired
Mon Feb 10, 2014 12:23 am
Forum: Volume 102 (10200-10299)
Topic: 10200 - Prime Time
Replies: 202
Views: 60983

Re: 10200 - Prime Time

import java.io.*; import java.math.*; import java.util.*; public class bigdigit { public static void main(String[] args)throws IOException { try{ Scanner sc = new Scanner(System.in); int i,j,n; BigInteger g,fact; long nw,m; n=sc.nextInt(); for(i = 1;i <= n;i++) { fact = BigInteger.valueOf(1); nw = s...
by try_tired
Thu Jan 30, 2014 10:53 am
Forum: Volume 6 (600-699)
Topic: 673 - Parentheses Balance
Replies: 243
Views: 45549

Re: 673 - Parentheses Balance

#include<iostream> #include<cstring> #include<cstdio> using namespace std; int main() { int i,j,k,top,n,file,ln; char s[200],ch,st[200]; scanf("%d",&n); top = 0; file = 0; for(j = 0;j<= n ;j++) { cin.getline(s,130,'\n'); ln = strlen(s); for( i=0; i<ln; i++) { if(s[0] == ']' || s[0] == ')' ) { file =...
by try_tired
Fri Jan 24, 2014 1:19 pm
Forum: Volume 101 (10100-10199)
Topic: 10106 - Product
Replies: 98
Views: 27073

Re: 10106 -Product

why i use class Main? isnt it class name? so,kmn is class name here. please tell me the differences between using,class Main and class kmn . :( import java.util.Scanner; import java.math.BigInteger; public class kmn{ public static void main(String args[]){ Scanner s = new Scanner(System.in); BigInte...
by try_tired
Fri Jan 24, 2014 7:25 am
Forum: Volume 101 (10100-10199)
Topic: 10106 - Product
Replies: 98
Views: 27073

Re: 10106 -Product

why i use class Main?
isnt it class name?
so,kmn is class name here.
please tell me the differences between using,class Main and class kmn .
by try_tired
Thu Jan 23, 2014 7:32 pm
Forum: Volume 101 (10100-10199)
Topic: 10106 - Product
Replies: 98
Views: 27073

Re: 10106 -Product

import java.util.Scanner; import java.math.BigInteger; public class kmn{ public static void main(String args[]){ Scanner s = new Scanner(System.in); BigInteger res; while(s.hasNext()){ BigInteger n=s.nextBigInteger(); BigInteger p=s.nextBigInteger(); res=n.multiply(p); System.out.println(res.toStrin...

Go to advanced search