結果

問題 No.734 Careful Engineer
ユーザー 👑 horiesinitihoriesiniti
提出日時 2018-12-09 15:36:31
言語 Haskell
(9.8.2)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 309 bytes
コンパイル時間 680 ms
コンパイル使用メモリ 156,936 KB
実行使用メモリ 7,328 KB
最終ジャッジ日時 2023-10-14 14:23:20
合計ジャッジ時間 2,137 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
7,188 KB
testcase_01 AC 2 ms
7,208 KB
testcase_02 AC 2 ms
7,180 KB
testcase_03 AC 3 ms
7,328 KB
testcase_04 AC 2 ms
7,120 KB
testcase_05 AC 3 ms
7,132 KB
testcase_06 AC 2 ms
7,096 KB
testcase_07 AC 2 ms
7,148 KB
testcase_08 AC 2 ms
7,152 KB
testcase_09 AC 2 ms
7,188 KB
testcase_10 AC 2 ms
7,204 KB
testcase_11 AC 2 ms
7,148 KB
testcase_12 AC 3 ms
7,112 KB
testcase_13 AC 3 ms
7,204 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 = do
       e<-getLine
       let (a:b:c:[])=map read (words e)::[Integer]
           d=if (60*a-b)<=0 then -1 else (3600*c) `div` (60*a-b)
           add=if (60*a-b)<=0 then -1 else (3600*c) `mod` (60*a-b)
           add2=if add==0 then 0 else 1
       print $ if d>=0 && (d+add2)>=1 then d+add2 else -1
0