結果
| 問題 | No.293 4>7の世界 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2019-01-18 17:19:21 | 
| 言語 | Nim (2.2.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 531 bytes | 
| コンパイル時間 | 2,965 ms | 
| コンパイル使用メモリ | 65,024 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-01 10:18:15 | 
| 合計ジャッジ時間 | 3,754 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 20 | 
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'sequtils' [UnusedImport]
ソースコード
import sequtils,strutils,macros
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) = stdin.readLine().split().unpack(2)
if a.len() > b.len(): echo a
elif a.len() < b.len() : echo b
else:
  for i in 0..<a.len():
    let sa = a[i]
    let sb = b[i]
    if sa == sb : continue
    if (sa == '4' and sb == '7') or (sa > sb and (sa != '7' or sb != '4')): echo a
    else: echo b
    break
# 1474836608
# 1607425306
            
            
            
        