結果
| 問題 | No.604 誕生日のお小遣い | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2019-01-18 09:51:31 | 
| 言語 | Nim (2.2.0) | 
| 結果 | 
                                CE
                                 
                            (最新) 
                                AC
                                 
                            (最初) | 
| 実行時間 | - | 
| コード長 | 712 bytes | 
| コンパイル時間 | 906 ms | 
| コンパイル使用メモリ | 72,320 KB | 
| 最終ジャッジ日時 | 2024-11-14 20:46:28 | 
| 合計ジャッジ時間 | 1,311 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge4 | 
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
            
            
            
            
            ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
/home/judge/data/code/Main.nim(2, 28) Error: cannot open file: queues
ソースコード
import sequtils,strutils,algorithm,math,sugar,macros,strformat import sets,tables,intsets,queues,heapqueue,bitops template get*():string = stdin.readLine().strip() macro unpack*(arr: auto,cnt: static[int]): auto = let t = genSym(); result = quote do:(let `t` = `arr`;()) for i in 0..<cnt: result[1].add(quote do:`t`[`i`]) let (a,b,c) = get().split().map(parseInt).unpack(3) proc f(x:int) : int = const tooBig = (4e18.int).fastLog2() let s = a+b-1 let t = x div a if t > 1 and fastLog2(s) + fastLog2(t) > tooBig : return 4e18.int return x mod a + s * t var x = 1 var y = 1e18.int + 10 while true: if c <= f(y) and f(y-1) < c: quit $y,0 let m = (x+y) div 2 if f(m) < c : x = m else : y = m
