結果

問題 No.112 ややこしい鶴亀算
ユーザー togatoga
提出日時 2015-08-25 10:02:18
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 5,000 ms
コード長 195 bytes
コンパイル時間 40 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,528 KB
最終ジャッジ日時 2024-07-18 13:20:24
合計ジャッジ時間 1,056 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()
A = map(int, raw_input().split())
S = sum(A) / (N - 1)
for x in range(51):
    for y in range(51):
        t = 2 * x + 4 * y
        if (t == S and x + y == N):
            print x,y
0