結果

問題 No.756 チャンパーノウン定数 (1)
ユーザー cielciel
提出日時 2018-12-06 12:22:14
言語 Kotlin
(1.9.23)
結果
TLE  
実行時間 -
コード長 428 bytes
コンパイル時間 11,939 ms
コンパイル使用メモリ 430,352 KB
実行使用メモリ 93,372 KB
最終ジャッジ日時 2024-04-30 19:38:11
合計ジャッジ時間 14,911 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 318 ms
58,600 KB
testcase_01 AC 321 ms
93,372 KB
testcase_02 TLE -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:2:10: warning: parameter 'args' is never used
fun main(args: Array<String>){
         ^

ソースコード

diff #

import java.util.*
fun main(args: Array<String>){
	val cin = Scanner(System.`in`)
	val starting:Long=1
	val bse:Long=10
	while(cin.hasNext()){
		var n=cin.nextLong()
		n+=starting-2
		var digits:Long=1
		var expbase:Long=1
		var x:Long=bse-1
		while(x<=n){
			n-=x
			digits+=1
			expbase*=bse
			x=digits*expbase*(bse-1)
		}
		var num=expbase+n/digits
		var d:Long=0
		while(d<digits-1-n%digits)num/=bse
		println(num%bse)
	}
}
0