提出 #25404409
ソースコード 拡げる
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
MyScanner in = new MyScanner(inputStream);
PrintWriter out = new PrintWriter(outputStream);
A solver = new A();
solver.solve(1, in, out);
out.close();
}
static class A {
public void solve(int testNumber, MyScanner in, PrintWriter out) {
int xy = (int) (in.Double() * 10);
int x = xy / 10;
int y = xy % 10;
out.print(x);
if (y <= 2) out.println("-");
else if (y <= 6) ;
else out.println("+");
}
}
static class MyScanner {
private BufferedReader in;
private StringTokenizer st;
public MyScanner(InputStream stream) {
in = new BufferedReader(new InputStreamReader(stream));
}
public String next() {
while (st == null || !st.hasMoreTokens()) {
try {
String rl = in.readLine();
if (rl == null) {
return null;
}
st = new StringTokenizer(rl);
} catch (IOException e) {
return null;
}
}
return st.nextToken();
}
public double Double() {
return Double.parseDouble(next());
}
}
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | A - Signed Difficulty |
| ユーザ | daira4000 |
| 言語 | Java (OpenJDK 11.0.6) |
| 得点 | 100 |
| コード長 | 1901 Byte |
| 結果 | AC |
| 実行時間 | 81 ms |
| メモリ | 32908 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 100 / 100 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | example0.txt, example1.txt, example2.txt |
| All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, example0.txt, example1.txt, example2.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 000.txt | AC | 72 ms | 32836 KiB |
| 001.txt | AC | 75 ms | 32848 KiB |
| 002.txt | AC | 73 ms | 32740 KiB |
| 003.txt | AC | 70 ms | 32772 KiB |
| 004.txt | AC | 81 ms | 32908 KiB |
| 005.txt | AC | 66 ms | 32428 KiB |
| 006.txt | AC | 70 ms | 32796 KiB |
| example0.txt | AC | 74 ms | 32892 KiB |
| example1.txt | AC | 72 ms | 32712 KiB |
| example2.txt | AC | 75 ms | 32824 KiB |