結果
| 問題 | No.8045 怪文書 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2019-04-01 21:26:27 | 
| 言語 | Python2 (2.7.18) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 145 bytes | 
| コンパイル時間 | 189 ms | 
| コンパイル使用メモリ | 6,912 KB | 
| 実行使用メモリ | 13,640 KB | 
| 最終ジャッジ日時 | 2024-11-26 11:02:38 | 
| 合計ジャッジ時間 | 25,252 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 7 WA * 5 TLE * 8 | 
ソースコード
N, M = map(int, raw_input().split())
if M >= N:
    print 0
    exit()
    
ans = 1
for i in xrange(1, N+1):
    ans = ans * i % M
    
print ans
            
            
            
        