Submission #32119


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import java.io.*;
import java.util.*;
import static java.lang.Math.*;
public class Main
{
private final static PrintWriter out = new PrintWriter(System.out);
private void solve()
{
final long a = nl();
final long b = nl();
final long x = (4*a - b) / (2);
out.println(x + " " + (a - x));
}
public static void main(String[] args)
{
new Main().solve();
out.close();
}
private final InputStream in = System.in;
private final byte[] buf = new byte[1 << 14];
private int bufPos = 0;
private int bufLen = 0;
boolean hasNext() {
if(bufPos >= bufLen) {
bufPos = 0;
try { bufLen = in.read(buf); } catch (IOException e) { e.printStackTrace(); }
}
return (bufPos < bufLen);
}
int ni() { return (int)nl(); }
int nc() { return hasNext()? buf[bufPos++] : -1; }
int nu() {
int ret = 0, c;
while ((c=nc()) <= 32);
while (c >= '0') {
ret = ret*10 + c-'0';
c = nc();
}
return (ret);
}
long nl() {
boolean minus = false;
int c;
long ret=0;
while ((c=nc()) <= 32);
if (c == '-') {
minus = true;
c = nc();
}
while (c >= '0') {
ret = ret*10 + c-'0';
c = nc();
}
return minus ? -ret : ret;
}
String ns() {
final StringBuilder sb = new StringBuilder();
int c;
while ((c=nc()) <= 32 && c != -1);
if (c == -1)return null;
while (c > 32) {
sb.appendCodePoint(c);
c = nc();
}
return sb.toString();
}
}

ステータス

項目 データ
問題 0899 - 鶴亀算
ユーザー名 Arumakan_ei1727
投稿日時 2018-03-13 13:34:14
言語 Java
状態 Accepted
得点 5
ソースコード長 1685 Byte
最大実行時間 79 ms
最大メモリ使用量 14304 KB

セット

セット 得点 Cases
1 All 5 / 5 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
Input01 AC 79 ms 14252 KB
1
Input02 AC 61 ms 14104 KB
1
Input03 AC 61 ms 13888 KB
1
Input04 AC 62 ms 13964 KB
1
Input05 AC 70 ms 13304 KB
1
Input06 AC 60 ms 12304 KB
1
Input07 AC 65 ms 13784 KB
1
Input08 AC 61 ms 11892 KB
1
Input09 AC 69 ms 12868 KB
1
Input10 AC 66 ms 13936 KB
1
Input11 AC 63 ms 13504 KB
1
Input12 AC 61 ms 12644 KB
1
Input13 AC 61 ms 13892 KB
1
Input14 AC 65 ms 14004 KB
1
Input15 AC 61 ms 14000 KB
1
Input16 AC 56 ms 13960 KB
1
Input17 AC 55 ms 13284 KB
1
Input18 AC 63 ms 13980 KB
1
Input19 AC 61 ms 12692 KB
1
Input20 AC 63 ms 14104 KB
1
Input21 AC 59 ms 12852 KB
1
Input22 AC 63 ms 11924 KB
1
Input23 AC 58 ms 14304 KB
1
Input24 AC 69 ms 12216 KB
1
Input25 AC 61 ms 11920 KB
1
Input26 AC 62 ms 14016 KB
1
Input27 AC 58 ms 13940 KB
1
Input28 AC 67 ms 14120 KB
1
Input29 AC 63 ms 14152 KB
1
Input30 AC 60 ms 14136 KB
1