結果
| 問題 | No.544 Delete 7 | 
| コンテスト | |
| ユーザー |  はむ吉🐹 | 
| 提出日時 | 2017-07-23 16:54:05 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 49 ms / 1,000 ms | 
| コード長 | 505 bytes | 
| コンパイル時間 | 472 ms | 
| コンパイル使用メモリ | 82,176 KB | 
| 実行使用メモリ | 54,144 KB | 
| 最終ジャッジ日時 | 2024-11-21 16:24:43 | 
| 合計ジャッジ時間 | 4,745 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 48 | 
ソースコード
#!/usr/bin/env pypy3
import random
ITER_LIMIT = 10 ** 6
MAX_ANS = 10 ** 9
MIN_ANS = -MAX_ANS
def maybe_ans(n):
    a = random.randint(0, MAX_ANS)
    b = n - a
    if "7" not in str(a) and "7" not in str(b):
        return (a, b)
def solve(n):
    for _ in range(ITER_LIMIT):
        res = maybe_ans(n)
        if res is not None:
            return res
    else:
        raise Exception("Oops!")
def main():
    a, b = solve(int(input()))
    print(a, b)
if __name__ == '__main__':
    main()
            
            
            
        