### Saratov State University :: Online Contester

::Go
- home
- news
- register
 - update personal info
 - problemset archive
- submit
- status online
- standing
- contests
- virtual contests
- forum
- statistic
- FAQ
- links
- projects

 ::Poll Are you registered on Codeforces?YesNoWhat is it???[results]

::webboard

 why runtime error in test case 2 ??
Author: mohamednabil00000
ID: 060530
Problem: 146
Contest: 0
Date: 2013-12-03 19:46:14

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Scanner;
import java.util.StringTokenizer;

public class Solution {

public static void main(String[] args) throws IOException {

Scanner in = new Scanner(System.in);

double l = in.nextDouble();
double n = in.nextDouble();
double ans = 0;
for (int i = 0; i < (int) n; i++) {
double t = in.nextDouble();
double v = in.nextDouble();
ans = (ans % l + ((double) t % l * (double) v % l) % l) % l;

}
System.out.printf("%.4fn", ans % l);

}
}

 ::Login form.login input{margin:2px;font-size:10px;} your id: password: Forgot password?

 ::News 22.10.12 - The problems from the Southern Subregional Programming Contest 2012 added to the problemset archive (542 - 553). 22.10.12 - After the start of the contest the statements in PDF will be available by the link.23.10.11 - The problems from the Southern Subregional Programming Contest 2011 added to the problemset archive (530 - 541).

::Counter

 Server time: 2018-06-23 00:54:59 Online Contester Team © 2002 - 2016. All rights reserved.