結果

問題 No.51 やる気の問題
ユーザー aimyaimy
提出日時 2017-04-20 16:08:48
言語 Haskell
(9.8.2)
結果
AC  
実行時間 32 ms / 5,000 ms
コード長 185 bytes
コンパイル時間 934 ms
コンパイル使用メモリ 157,876 KB
実行使用メモリ 22,248 KB
最終ジャッジ日時 2023-09-27 03:42:04
合計ジャッジ時間 2,542 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
7,248 KB
testcase_01 AC 3 ms
7,200 KB
testcase_02 AC 2 ms
7,244 KB
testcase_03 AC 3 ms
7,744 KB
testcase_04 AC 3 ms
7,340 KB
testcase_05 AC 23 ms
14,488 KB
testcase_06 AC 12 ms
12,952 KB
testcase_07 AC 12 ms
12,728 KB
testcase_08 AC 5 ms
10,344 KB
testcase_09 AC 32 ms
22,248 KB
testcase_10 AC 6 ms
10,964 KB
testcase_11 AC 5 ms
10,360 KB
testcase_12 AC 12 ms
13,444 KB
testcase_13 AC 12 ms
13,640 KB
testcase_14 AC 7 ms
12,124 KB
testcase_15 AC 22 ms
16,748 KB
testcase_16 AC 5 ms
9,772 KB
testcase_17 AC 4 ms
7,996 KB
testcase_18 AC 22 ms
16,624 KB
testcase_19 AC 23 ms
17,104 KB
testcase_20 AC 12 ms
13,064 KB
testcase_21 AC 3 ms
8,040 KB
testcase_22 AC 32 ms
22,216 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.6.1/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking a.out

ソースコード

diff #

main = getContents >>= print . yaruki . map read . words

yaruki [w,d] = fst $ until ((==1).snd) work (w,d)
 where work (w,d) = (w - truncate (fromIntegral w / (fromIntegral d)^2), d-1)
0