42 lines
1.1 KiB
Java
42 lines
1.1 KiB
Java
package com.kattis.ncpc25.log.rider;
|
|
|
|
import java.io.BufferedReader;
|
|
import java.io.IOException;
|
|
import java.io.InputStreamReader;
|
|
|
|
public class K {
|
|
public static void main(String[] args) throws IOException {
|
|
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
|
|
int num = Integer.parseInt(in.readLine());
|
|
String[] signs = new String[num];
|
|
for(int i = 0; i < num; i++)
|
|
{
|
|
signs[i] = in.readLine();
|
|
}
|
|
int lastTop = 0;
|
|
int lastTopRound = 0;
|
|
for(String l : signs)
|
|
{
|
|
if(l.equalsIgnoreCase("/"))
|
|
{
|
|
System.out.println(lastTopRound);
|
|
continue;
|
|
}
|
|
int limit = Integer.parseInt(l);
|
|
if(limit > lastTopRound)
|
|
{
|
|
int tmp = (int)Math.ceil(limit/10.0)*10;
|
|
if(tmp == 90)
|
|
{
|
|
lastTopRound = 100;
|
|
}
|
|
else if(tmp <= 160)
|
|
{
|
|
lastTopRound = tmp;
|
|
}
|
|
}
|
|
System.out.println(limit);
|
|
}
|
|
}
|
|
}
|