結果
| 問題 |
No.293 4>7の世界
|
| コンテスト | |
| ユーザー |
n_knuu
|
| 提出日時 | 2016-04-05 10:04:52 |
| 言語 | Nim (2.2.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 386 bytes |
| コンパイル時間 | 3,095 ms |
| コンパイル使用メモリ | 64,896 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-29 13:30:09 |
| 合計ジャッジ時間 | 3,910 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 20 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 18) Warning: imported and not used: 'sequtils' [UnusedImport]
ソースコード
import strutils, sequtils
let
input = stdin.readline.split
(A, B) = (input[0], input[1])
if A.len != B.len:
echo(if A.len > B.len: A else: B)
else:
for i in 0..<A.len:
var
a = A[i]
b = B[i]
if a != b:
if a == '4' and b == '7':
echo(A)
elif a == '7' and b == '4':
echo(B)
else:
echo(if a > b: A else: B)
break
n_knuu