結果
| 問題 |
No.201 yukicoderじゃんけん
|
| コンテスト | |
| ユーザー |
kou_kkk
|
| 提出日時 | 2024-12-03 09:11:47 |
| 言語 | Nim (2.2.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 378 bytes |
| コンパイル時間 | 3,850 ms |
| コンパイル使用メモリ | 62,496 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-03 09:11:52 |
| 合計ジャッジ時間 | 5,220 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 WA * 16 |
ソースコード
import strscans
proc cmpS(a, b: string): int =
result = 0
if a == b: return result
if a.len != b.len: return cmp(a.len, b.len)
for i in 0..<a.len:
if a[i] == b[i]: continue
return cmp(a[i], b[i])
let
(_, sa, pa) = stdin.readLine.scanTuple"$w $w"
(_, sb, pb) = stdin.readLine.scanTuple"$w $w"
echo:
case cmpS(pa, pb):
of 0: "-1"
of 1: sa
else: sb
kou_kkk